mirror of
https://github.com/penpot/penpot.git
synced 2026-11-06 01:50:39 +00:00
🐛 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:
parent
24aa480aff
commit
7a64bd9b67
@ -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() {}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user