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

Function fail

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

Source from the content-addressed store, hash-verified

167}
168
169function fail (binding) {
170 return new Promise((resolve, reject) => {
171 const worker = binding.createWork(-1,
172 common.mustCall((err) => {
173 assert.throws(() => { throw err; }, /test error/);
174 resolve();
175 }),
176 common.mustNotCall()
177 );
178 binding.queueWork(worker);
179 });
180}

Callers 1

testFunction · 0.70

Calls

no outgoing calls

Tested by 1

testFunction · 0.56