diff options
Diffstat (limited to 'test/parallel/test-timers-ordering.js')
-rw-r--r-- | test/parallel/test-timers-ordering.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test/parallel/test-timers-ordering.js b/test/parallel/test-timers-ordering.js index 9f40288ec5..730a78a072 100644 --- a/test/parallel/test-timers-ordering.js +++ b/test/parallel/test-timers-ordering.js @@ -1,3 +1,4 @@ +'use strict'; var common = require('../common'); var assert = require('assert'); var Timer = process.binding('timer_wrap').Timer; @@ -13,13 +14,15 @@ var start = Timer.now(); var f = function(i) { if (i <= N) { // check order - assert.equal(i, last_i + 1, 'order is broken: ' + i + ' != ' + last_i + ' + 1'); + assert.equal(i, last_i + 1, 'order is broken: ' + i + ' != ' + + last_i + ' + 1'); last_i = i; // check that this iteration is fired at least 1ms later than the previous var now = Timer.now(); console.log(i, now); - assert(now >= last_ts + 1, 'current ts ' + now + ' < prev ts ' + last_ts + ' + 1'); + assert(now >= last_ts + 1, + 'current ts ' + now + ' < prev ts ' + last_ts + ' + 1'); last_ts = now; // schedule next iteration |