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

Function asserts

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

Source from the content-addressed store, hash-verified

141}
142
143async function asserts() {
144 const m = new SourceTextModule(`
145 import "foo" with { n1: 'v1', n2: 'v2' };
146 `, { identifier: 'm' });
147 await m.link(common.mustCall((s, r, p) => {
148 assert.strictEqual(s, 'foo');
149 assert.strictEqual(r.identifier, 'm');
150 assert.strictEqual(p.attributes.n1, 'v1');
151 assert.strictEqual(p.assert.n1, 'v1');
152 assert.strictEqual(p.attributes.n2, 'v2');
153 assert.strictEqual(p.assert.n2, 'v2');
154 return new SourceTextModule('');
155 }));
156}
157
158const finished = common.mustCall();
159

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…