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

Function testInvalid

test/parallel/test-vm-module-import-meta.js:26–39  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

24}
25
26async function testInvalid() {
27 for (const invalidValue of [
28 null, {}, 0, Symbol.iterator, [], 'string', false,
29 ]) {
30 assert.throws(() => {
31 new SourceTextModule('', {
32 initializeImportMeta: invalidValue
33 });
34 }, {
35 code: 'ERR_INVALID_ARG_TYPE',
36 name: 'TypeError'
37 });
38 }
39}
40
41(async () => {
42 await testBasic();

Callers 2

runTestsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…