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

Function invalidLinkValue

test/parallel/test-vm-module-link.js:31–45  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

29}
30
31async function invalidLinkValue() {
32 const invalidValues = [
33 undefined,
34 null,
35 {},
36 SourceTextModule.prototype,
37 ];
38
39 for (const value of invalidValues) {
40 const module = new SourceTextModule('import "foo"');
41 await assert.rejects(module.link(() => value), {
42 code: 'ERR_VM_MODULE_NOT_MODULE',
43 });
44 }
45}
46
47async function depth() {
48 const foo = new SourceTextModule('export default 5');

Callers 1

Calls 1

linkMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…