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.

21 lines
390 B

'use strict';
/*
* This test is a regression test for joyent/node#8900.
*/
require('../common');
var assert = require('assert');
var N = 5;
var nbIntervalFired = 0;
var timer = setInterval(function() {
++nbIntervalFired;
if (nbIntervalFired === N)
clearInterval(timer);
}, 1);
timer.unref();
setTimeout(function onTimeout() {
assert.strictEqual(nbIntervalFired, N);
}, 100);