MCPcopy Index your code
hub / github.com/nodejs/node / testNotFoundErrors

Function testNotFoundErrors

test/es-module/test-vm-main-context-default-loader.js:32–41  ·  view source on GitHub ↗
(options)

Source from the content-addressed store, hash-verified

30assert.strictEqual(typeof USE_MAIN_CONTEXT_DEFAULT_LOADER, 'symbol');
31
32async function testNotFoundErrors(options) {
33 // Import user modules.
34 const script = new Script('import("./message.mjs")', options);
35 // Use try-catch for better async stack traces in the logs.
36 await assert.rejects(script.runInThisContext(), { code: 'ERR_MODULE_NOT_FOUND' });
37
38 const imported = compileFunction('return import("./message.mjs")', [], options)();
39 // Use try-catch for better async stack traces in the logs.
40 await assert.rejects(imported, { code: 'ERR_MODULE_NOT_FOUND' });
41}
42
43async function testLoader(options) {
44 {

Callers 1

mainFunction · 0.85

Calls 2

runInThisContextMethod · 0.95
compileFunctionFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…