You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

14 lines
273 B

'use strict';
require('../common');
const assert = require('assert');
var N = 5;
var n = 0;
function f() {
if (++n < N) setTimeout(f, 5);
}
process.on('beforeExit', f);
process.on('exit', function() {
assert.equal(n, N + 1); // The sixth time we let it through.
});