Keep isolated page import compatible with test type checking
This commit is contained in:
1 parent
a023049431
commit
41383960f8
1 file changed
+2
-1
@@ -18,7 +18,8 @@ test("separately bundled preview modules reuse one realm sanitizer", async () =>
|
||||
builderPreviewHTML("<p>First page</p>", doc);
|
||||
const key = Symbol.for("wrnexus.block-editor.preview-sanitizer");
|
||||
const first = (window as any)[key];
|
||||
const secondModule = await import("../src/preview-html.ts?second-page");
|
||||
const secondPageModule = "../src/preview-html.ts?second-page";
|
||||
const secondModule = await import(secondPageModule);
|
||||
expect(String(secondModule.builderPreviewHTML("<p>Second page</p>", doc))).toContain("Second page");
|
||||
expect((window as any)[key]).toBe(first);
|
||||
window.close();
|
||||
|
||||
Reference in new issue
Block a user