MCPcopy Create free account
hub / github.com/nodejs/node-addon-api / testFinalize

Function testFinalize

test/objectwrap.js:261–276  ·  view source on GitHub ↗
(clazz)

Source from the content-addressed store, hash-verified

259 };
260
261 async function testFinalize (clazz) {
262 let finalizeCalled = false;
263 await testUtil.runGCTests([
264 'test finalize',
265 () => {
266 const finalizeCb = function (called) {
267 finalizeCalled = called;
268 };
269
270 // Scope Test instance so that it can be gc'd.
271 // eslint-disable-next-line no-new
272 (() => { new Test(finalizeCb); })();
273 },
274 () => assert.strictEqual(finalizeCalled, true)
275 ]);
276 }
277
278 const testUnwrap = (obj, clazz) => {
279 obj.testSetter = 'unwrapTest';

Callers 1

testClassFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected