🐛 Give the MCP plugin test the version check it calls

The connection metadata test runs plugin.ts with its imports replaced
by stand-ins. They lacked extractMinorVersion and isCompatibleVersion,
which plugin.ts calls on connect, so the test of an integrated plugin
that stays idle until connected failed. The stand-ins now pass the real
version check functions through.
This commit is contained in:
alonso.torres 2026-11-04 12:29:43 +01:00
parent 24aa480aff
commit 7a64bd9b67

View File

@ -7,6 +7,7 @@ import ts from "typescript";
import { shouldReconnectAfterClose } from "./ReconnectPolicy.ts";
import { SessionId } from "./SessionId.ts";
import { SessionIdDisplay } from "./SessionIdDisplay.ts";
import { extractMinorVersion, isCompatibleVersion } from "./VersionCompatibility.ts";
/** Compiles the actual plugin entry point for a simulated browser boundary. */
function compile(name: string) {
@ -163,6 +164,8 @@ test("answers heartbeat requests once initialized, without forwarding them to th
*/
const pluginModules = {
ExecuteCodeTaskHandler: class {},
extractMinorVersion,
isCompatibleVersion,
LocalStorageRollbackStore: class {},
RollbackLog: class {
listen() {}