node-fake-timer
Fake Timer API for node.js.
;; ;let q = ;; initstart-1 ;
{ id: 3,
real_init: moment("2017-11-10T22:46:00.523"),
fake_init: moment("2017-11-10T22:46:00.523"),
fake_now: moment("2017-11-10T22:46:00.523"),
fake_old: moment("2017-11-10T22:46:00.523") }
[ { id: 1,
name: 'BJg-2sVXkG',
timing: moment("2017-11-10T22:46:01.023"),
callback: [Function],
params: [],
type: 'setTimeout',
index: 1 },
{ id: 0,
name: 'H1-2jVQJz',
timing: moment("2017-11-10T22:46:02.023"),
callback: [Function],
params: [],
type: 'setTimeout',
index: 2 } ]
[ { id: 2,
name: 'BkW-2oVQkG',
timing: moment("2017-11-10T22:46:00.523"),
callback: [Function],
params: [],
type: 'setImmediate',
index: 0,
active: moment("2017-11-10T22:46:00.527"),
ending: moment("2017-11-10T22:46:00.527") } ]
false
{ id: 3,
real_init: moment("2017-11-10T22:46:00.523"),
fake_init: moment("2017-11-10T22:46:00.523"),
fake_now: moment("2017-11-10T22:46:01.023"),
fake_old: moment("2017-11-10T22:46:00.523") }
[ { id: 0,
name: 'H1-2jVQJz',
timing: moment("2017-11-10T22:46:02.023"),
callback: [Function],
params: [],
type: 'setTimeout',
index: 1 } ]
[ { id: 1,
name: 'BJg-2sVXkG',
timing: moment("2017-11-10T22:46:01.023"),
callback: [Function],
params: [],
type: 'setTimeout',
index: 0,
active: moment("2017-11-10T22:46:00.532"),
ending: moment("2017-11-10T22:46:00.532") } ]
false
[real] 10 ms
[fake] 500 ms