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

Function makeCallbackTestFunction

test/function.js:37–44  ·  view source on GitHub ↗
(receiver, expectedOne, expectedTwo, expectedThree)

Source from the content-addressed store, hash-verified

35 }
36
37 function makeCallbackTestFunction (receiver, expectedOne, expectedTwo, expectedThree) {
38 return function callback (one, two, three) {
39 assert.strictEqual(this, receiver);
40 assert.strictEqual(one, expectedOne);
41 assert.strictEqual(two, expectedTwo);
42 assert.strictEqual(three, expectedThree);
43 };
44 }
45
46 ret = 4;
47 assert.strictEqual(binding.callWithArgs(testFunction, 1, 2, 3), 4);

Callers 1

testFunction · 0.85

Calls

no outgoing calls

Tested by 1

testFunction · 0.68