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

Function runTest

test/js-native-api/8_passing_wrapped/test.js:9–20  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7const { gcUntil } = require('../../common/gc');
8
9async function runTest() {
10 let obj1 = addon.createObject(10);
11 let obj2 = addon.createObject(20);
12 const result = addon.add(obj1, obj2);
13 assert.strictEqual(result, 30);
14
15 // Make sure the native destructor gets called.
16 obj1 = null;
17 obj2 = null;
18 await gcUntil('8_passing_wrapped',
19 () => (addon.finalizeCount() === 2));
20}
21runTest();

Callers 1

test.jsFile · 0.70

Calls 2

gcUntilFunction · 0.85
addMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…