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

Function testFinalizeAndWrap

test/js-native-api/test_general/testFinalizer.js:28–36  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

26// Add an item to an object that is already wrapped, and ensure that its
27// finalizer as well as the wrap finalizer gets called.
28async function testFinalizeAndWrap() {
29 assert.strictEqual(test_general.derefItemWasCalled(), false);
30 let finalizeAndWrap = {};
31 test_general.wrap(finalizeAndWrap);
32 test_general.addFinalizerOnly(finalizeAndWrap, common.mustCall());
33 finalizeAndWrap = null;
34 await gcUntil('test finalize and wrap',
35 () => test_general.derefItemWasCalled());
36}
37testFinalizeAndWrap();

Callers 1

testFinalizer.jsFile · 0.85

Calls 2

gcUntilFunction · 0.85
wrapMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…