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

Function signalTest

test/async_progress_worker.js:182–200  ·  view source on GitHub ↗
(bindingFunction)

Source from the content-addressed store, hash-verified

180}
181
182function signalTest (bindingFunction) {
183 return new Promise((resolve, reject) => {
184 bindingFunction(
185 common.mustCall((err) => {
186 if (err) {
187 return reject(err);
188 }
189 resolve();
190 }),
191 common.mustCallAtLeast((error, reason) => {
192 try {
193 assert(!error, reason);
194 } catch (e) {
195 reject(e);
196 }
197 }, 1)
198 );
199 });
200}

Callers 1

testFunction · 0.85

Calls

no outgoing calls

Tested by 1

testFunction · 0.68