1'use strict'; 2const common = require('../../common'); 3const assert = require('assert'); 4const test_async = require(`./build/${common.buildType}/test_async`); 5const iterations = 500; 6 7let x = 0; 8const workDone = common.mustCall((status) => { 9 assert.strictEqual(status, 0); 10 if (++x < iterations) { 11 setImmediate(() => test_async.DoRepeatedWork(workDone)); 12 } 13}, iterations); 14test_async.DoRepeatedWork(workDone); 15