mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
The Code Mode extension imported it from /portable, which loads the WASM QuickJS runtime the extension never uses. closes #11254
11 lines
471 B
TypeScript
11 lines
471 B
TypeScript
import { expect, test, vi } from "vitest";
|
|
import { createCodemodeExtension } from "../src/codemode/codemode.ts";
|
|
|
|
// The extension runs scripts in the sandbox the host passes, so loading it must not load the WASM VM (#11254).
|
|
vi.mock("quickjs-wasi", () => {
|
|
throw new Error("the Code Mode extension loaded quickjs-wasi");
|
|
});
|
|
|
|
test("the Code Mode extension loads without pi-codemode's WASM runtime", () => {
|
|
expect(createCodemodeExtension).toBeTypeOf("function");
|
|
});
|