@@ -93,7 +93,7 @@ describe("channel plugin module loader helpers", () => {
|
93 | 93 | expect(createJiti).not.toHaveBeenCalled(); |
94 | 94 | }); |
95 | 95 | |
96 | | -it("uses the runtime-supported Jiti boundary for Windows dist loads", async () => { |
| 96 | +it("creates the runtime-supported Jiti boundary for Windows dist loads", async () => { |
97 | 97 | const createJiti = vi.fn(() => vi.fn(() => ({ ok: true }))); |
98 | 98 | vi.doMock("jiti", () => ({ |
99 | 99 | createJiti, |
@@ -108,15 +108,15 @@ describe("channel plugin module loader helpers", () => {
|
108 | 108 | const rootDir = createTempDir(); |
109 | 109 | const modulePath = path.join(rootDir, "dist", "extensions", "demo", "index.js"); |
110 | 110 | fs.mkdirSync(path.dirname(modulePath), { recursive: true }); |
111 | | -fs.writeFileSync(modulePath, "export {};\n", "utf8"); |
| 111 | +fs.writeFileSync(modulePath, "export const ok = true;\n", "utf8"); |
112 | 112 | |
113 | | -expect( |
114 | | -loaderModule.loadChannelPluginModule({ |
115 | | - modulePath, |
116 | | - rootDir, |
117 | | - shouldTryNativeRequire: () => false, |
118 | | - }), |
119 | | -).toEqual({ ok: true }); |
| 113 | +const loaded = loaderModule.loadChannelPluginModule({ |
| 114 | +modulePath, |
| 115 | +rootDir, |
| 116 | +shouldTryNativeRequire: () => false, |
| 117 | +}); |
| 118 | + |
| 119 | +expect(loaded).toMatchObject({ ok: true }); |
120 | 120 | expect(createJiti).toHaveBeenCalledWith( |
121 | 121 | expect.any(String), |
122 | 122 | expect.objectContaining({ |
|