




























@@ -8,10 +8,10 @@ import {
88resetRegistryJitiMocks,
99} from "./test-helpers/registry-jiti-mocks.js";
101011-// plugin-module-loader-cache prefers native require() for compiled .js before falling
12-// back to jiti. These tests scripts plugin-loading behaviour through the
13-// source-transform mock — disable the native-require fast path so the mocked source transformer
14-// stays authoritative for the test fixture files on disk.
11+// plugin-module-loader-cache prefers native require() for compiled .js before
12+// falling back to jiti. These tests script plugin-loading behavior through the
13+// source-transform mock, so force the fallback path and keep the fixture
14+// transformer authoritative.
1515vi.mock("./native-module-require.js", () => ({
1616isJavaScriptModulePath: (_modulePath: string) => false,
1717tryNativeRequireJavaScriptModule: (_modulePath: string) => ({ ok: false }),
@@ -210,7 +210,7 @@ describe("setup-registry module loader", () => {
210210);
211211expect(mocks.createJiti.mock.calls[0]?.[1]).toEqual(
212212expect.objectContaining({
213-tryNative: false,
213+tryNative: true,
214214}),
215215);
216216});
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。