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

Function fail

test/async_progress_worker.js:170–180  ·  view source on GitHub ↗
(binding)

Source from the content-addressed store, hash-verified

168}
169
170function fail (binding) {
171 return new Promise((resolve) => {
172 binding.doWork(-1,
173 common.mustCall((err) => {
174 assert.throws(() => { throw err; }, /test error/);
175 resolve();
176 }),
177 common.mustNotCall()
178 );
179 });
180}
181
182function signalTest (bindingFunction) {
183 return new Promise((resolve, reject) => {

Callers 1

testFunction · 0.70

Calls

no outgoing calls

Tested by 1

testFunction · 0.56