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

Function check

test/threadsafe_function/threadsafe_function_sum.js:37–42  ·  view source on GitHub ↗
(bindingFunction)

Source from the content-addressed store, hash-verified

35
36function test (binding) {
37 async function check (bindingFunction) {
38 const calls = [];
39 const result = await bindingFunction(THREAD_COUNT, Array.prototype.push.bind(calls));
40 assert.ok(result);
41 assert.equal(sum(calls), EXPECTED_SUM);
42 }
43
44 async function checkAcquire () {
45 const calls = [];

Callers 1

testFunction · 0.70

Calls 1

sumFunction · 0.70

Tested by 1

testFunction · 0.56