revert(test): restore upstream jiti test — Node 24.13 breakage is upstream issue
This commit is contained in:
parent
b9c59976d3
commit
d8e55eebd9
@ -77,9 +77,9 @@ export const copiedRuntimeMarker = {
|
|||||||
...__testing.buildPluginLoaderJitiOptions({}),
|
...__testing.buildPluginLoaderJitiOptions({}),
|
||||||
tryNative: false,
|
tryNative: false,
|
||||||
});
|
});
|
||||||
// Node 24.13+ sealed `require` on ESM module objects, breaking Jiti's sync
|
// The production loader uses sync Jiti evaluation, so this regression test
|
||||||
// CJS path when tryNative is false. Use the async `.import()` helper instead.
|
// should exercise the same seam instead of Jiti's async import helper.
|
||||||
await expect(async () => await withoutAlias.import(copiedChannelRuntime)).rejects.toThrow();
|
expect(() => withoutAlias(copiedChannelRuntime)).toThrow();
|
||||||
|
|
||||||
const withAlias = createJiti(jitiBaseUrl, {
|
const withAlias = createJiti(jitiBaseUrl, {
|
||||||
...__testing.buildPluginLoaderJitiOptions({
|
...__testing.buildPluginLoaderJitiOptions({
|
||||||
@ -87,7 +87,7 @@ export const copiedRuntimeMarker = {
|
|||||||
}),
|
}),
|
||||||
tryNative: false,
|
tryNative: false,
|
||||||
});
|
});
|
||||||
expect(await withAlias.import(copiedChannelRuntime)).toMatchObject({
|
expect(withAlias(copiedChannelRuntime)).toMatchObject({
|
||||||
copiedRuntimeMarker: {
|
copiedRuntimeMarker: {
|
||||||
PAIRING_APPROVED_MESSAGE: "paired",
|
PAIRING_APPROVED_MESSAGE: "paired",
|
||||||
resolveOutboundSendDep: expect.any(Function),
|
resolveOutboundSendDep: expect.any(Function),
|
||||||
|
|||||||
@ -3595,9 +3595,9 @@ export const syntheticRuntimeMarker = {
|
|||||||
...__testing.buildPluginLoaderJitiOptions({}),
|
...__testing.buildPluginLoaderJitiOptions({}),
|
||||||
tryNative: false,
|
tryNative: false,
|
||||||
});
|
});
|
||||||
// Node 24.13+ sealed `require` on ESM module objects, breaking Jiti's sync
|
// The production loader uses sync Jiti evaluation, so this boundary should
|
||||||
// CJS path when tryNative is false. Use the async `.import()` helper instead.
|
// follow the same path instead of the async import helper.
|
||||||
await expect(async () => await withoutAlias.import(copiedChannelRuntime)).rejects.toThrow();
|
expect(() => withoutAlias(copiedChannelRuntime)).toThrow();
|
||||||
|
|
||||||
const withAlias = createJiti(jitiBaseUrl, {
|
const withAlias = createJiti(jitiBaseUrl, {
|
||||||
...__testing.buildPluginLoaderJitiOptions({
|
...__testing.buildPluginLoaderJitiOptions({
|
||||||
@ -3605,7 +3605,7 @@ export const syntheticRuntimeMarker = {
|
|||||||
}),
|
}),
|
||||||
tryNative: false,
|
tryNative: false,
|
||||||
});
|
});
|
||||||
expect(await withAlias.import(copiedChannelRuntime)).toMatchObject({
|
expect(withAlias(copiedChannelRuntime)).toMatchObject({
|
||||||
syntheticRuntimeMarker: {
|
syntheticRuntimeMarker: {
|
||||||
resolveOutboundSendDep: expect.any(Function),
|
resolveOutboundSendDep: expect.any(Function),
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user