Commit 6263c008 authored by Rich Trott's avatar Rich Trott
Browse files

test: provide duration/interval to timers

There are places in the code base where setTimeout() or
setInterval() are called with just a callback and no duration/interval.
The timers module will use a value of `1` in that situation.

An unspecified duration or interval can be confusing. Did the original
author forget to provide a value? Did they intend to use setImmediate()
or process.nextTick() instead of setTimeout()? And so on.

This change provides a duration or interval of `1` to all calls in the
codebase where it is missing. `parallel/test-timers.js` still tests the
situation where `setTimeout()` and `setInterval()` are called with
`undefined` and other non-numeric values for the duration/interval.

PR-URL: https://github.com/nodejs/node/pull/9472


Reviewed-By: default avatarTeddy Katz <teddy.katz@gmail.com>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
parent 38b18e33
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment