Skip to content

Commit 3b1b4de

Browse files
jscissrcjihrig
authored andcommitted
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: nodejs/node-v0.x-archive#9171 Reviewed-by: Colin Ihrig <[email protected]> Reviewed-by: Timothy J Fontaine <[email protected]> Conflicts: test/simple/test-timers-unref.js
1 parent 30dca66 commit 3b1b4de

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/parallel/test-timers-unref.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ setTimeout(function() {
2121
interval = setInterval(function() {
2222
unref_interval = true;
2323
clearInterval(interval);
24-
}, SHORT_TIME).unref();
24+
}, SHORT_TIME);
25+
interval.unref();
2526

2627
setTimeout(function() {
2728
unref_timer = true;

0 commit comments

Comments
 (0)