diff --git a/src/channels/plugins/module-loader.test.ts b/src/channels/plugins/module-loader.test.ts index 0f38abac390..66cfcff43d9 100644 --- a/src/channels/plugins/module-loader.test.ts +++ b/src/channels/plugins/module-loader.test.ts @@ -93,7 +93,7 @@ describe("channel plugin module loader helpers", () => { expect(createJiti).not.toHaveBeenCalled(); }); - it("uses the runtime-supported Jiti boundary for Windows dist loads", async () => { + it("creates the runtime-supported Jiti boundary for Windows dist loads", async () => { const createJiti = vi.fn(() => vi.fn(() => ({ ok: true }))); vi.doMock("jiti", () => ({ createJiti, @@ -108,15 +108,15 @@ describe("channel plugin module loader helpers", () => { const rootDir = createTempDir(); const modulePath = path.join(rootDir, "dist", "extensions", "demo", "index.js"); fs.mkdirSync(path.dirname(modulePath), { recursive: true }); - fs.writeFileSync(modulePath, "export {};\n", "utf8"); + fs.writeFileSync(modulePath, "export const ok = true;\n", "utf8"); - expect( - loaderModule.loadChannelPluginModule({ - modulePath, - rootDir, - shouldTryNativeRequire: () => false, - }), - ).toEqual({ ok: true }); + const loaded = loaderModule.loadChannelPluginModule({ + modulePath, + rootDir, + shouldTryNativeRequire: () => false, + }); + + expect(loaded).toMatchObject({ ok: true }); expect(createJiti).toHaveBeenCalledWith( expect.any(String), expect.objectContaining({