mirror of
https://github.com/nodejs/node.git
synced 2025-08-15 13:48:44 +02:00

PR-URL: https://github.com/nodejs/node/pull/53846 Fixes: https://github.com/nodejs/node/issues/53807 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
8 lines
267 B
JavaScript
8 lines
267 B
JavaScript
import { mock } from 'node:test';
|
|
|
|
try {
|
|
mock.module?.('Whatever, this is not significant', { namedExports: {} });
|
|
} catch {}
|
|
|
|
const { string } = await import('./basic-esm-without-extension');
|
|
console.log(`Found string: ${string}`); // prints 'original esm string'
|