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

Function tick

test/testUtil.js:4–14  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

2// with an async delay and GC call between each.
3
4function tick (x) {
5 return new Promise((resolve) => {
6 setImmediate(function ontick () {
7 if (--x === 0) {
8 resolve();
9 } else {
10 setImmediate(ontick);
11 }
12 });
13 });
14}
15
16async function runGCTests (tests) {
17 // Break up test list into a list of lists of the form

Callers 1

runGCTestsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected