From 3b1b4de9033e2dd167061692c31b9231368ccb81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Sch=C3=A4r?= Date: Mon, 9 Feb 2015 16:51:12 +0100 Subject: [PATCH] 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 Reviewed-by: Timothy J Fontaine Conflicts: test/simple/test-timers-unref.js --- test/parallel/test-timers-unref.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/parallel/test-timers-unref.js b/test/parallel/test-timers-unref.js index c4f9d820e5601f..9434dbbd36ad78 100644 --- a/test/parallel/test-timers-unref.js +++ b/test/parallel/test-timers-unref.js @@ -21,7 +21,8 @@ setTimeout(function() { interval = setInterval(function() { unref_interval = true; clearInterval(interval); -}, SHORT_TIME).unref(); +}, SHORT_TIME); +interval.unref(); setTimeout(function() { unref_timer = true;