Skip to content
This repository was archived by the owner on Apr 22, 2023. It is now read-only.

Commit d2b5461

Browse files
jscissrtrevnorris
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: #9171 Reviewed-by: Colin Ihrig <cjihrig@gmail.com> Reviewed-by: Timothy J Fontaine <tjfontaine@gmail.com>
1 parent 8d8a2f2 commit d2b5461

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/simple/test-timers-unref.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ setTimeout(function() {
4242
interval = setInterval(function() {
4343
unref_interval = true;
4444
clearInterval(interval);
45-
}, SHORT_TIME).unref();
45+
}, SHORT_TIME);
46+
interval.unref();
4647

4748
setTimeout(function() {
4849
unref_timer = true;

0 commit comments

Comments
 (0)