lib: remove redundant code, add tests in timers.js
authorRich Trott <rtrott@gmail.com>
Thu, 1 Oct 2015 05:18:36 +0000 (22:18 -0700)
committerJames M Snell <jasnell@gmail.com>
Thu, 8 Oct 2015 03:39:16 +0000 (20:39 -0700)
commit63644dd1cd6e6765b52f60d54b0f94f7c69a8f79
treee8d663e65d6fcee41c7c97c52a1335a4d88b1525
parent8dfdee3733465d64ccf23dd737ad5bc38e610b70
lib: remove redundant code, add tests in timers.js

insert() is only called from one place where there is already a check
that msecs is greater than or equal to zero, so do not repeat the check
inside insert().

timers.active() is not documented and should not be exposed, but since
it is exposed for now, let's test it.

PR-URL: https://github.com/nodejs/node/pull/3143
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
lib/timers.js
test/parallel/test-timers-active.js [new file with mode: 0644]