Browse Source

test: Timeout#unref() does not return instance

Timeout#unref() call returns undefined, not this. The test already
worked before, because the interval was still unref'd, and the test also
succeeds without clearing the interval.

PR-URL: https://github.com/joyent/node/pull/9171
Reviewed-by: Colin Ihrig <cjihrig@gmail.com>
Reviewed-by: Timothy J Fontaine <tjfontaine@gmail.com>
v0.12.2-release
Jan Schär 10 years ago
committed by Trevor Norris
parent
commit
d2b546187a
  1. 3
      test/simple/test-timers-unref.js

3
test/simple/test-timers-unref.js

@ -42,7 +42,8 @@ setTimeout(function() {
interval = setInterval(function() {
unref_interval = true;
clearInterval(interval);
}, SHORT_TIME).unref();
}, SHORT_TIME);
interval.unref();
setTimeout(function() {
unref_timer = true;

Loading…
Cancel
Save