summaryrefslogtreecommitdiff
path: root/test/parallel/test-timers-unref.js
diff options
context:
space:
mode:
authorcjihrig <cjihrig@gmail.com>2016-07-12 19:47:32 -0400
committercjihrig <cjihrig@gmail.com>2016-07-14 22:07:14 -0400
commit4a408321d9c4a6964c9d89a0dd09067f36b4dbfc (patch)
tree5014fee0b2ef8772f4ebf60fd4bf27a72b0ef5b9 /test/parallel/test-timers-unref.js
parent4220c24b17955f7f627bcedc89b6c2a0e655e618 (diff)
downloadandroid-node-v8-4a408321d9c4a6964c9d89a0dd09067f36b4dbfc.tar.gz
android-node-v8-4a408321d9c4a6964c9d89a0dd09067f36b4dbfc.tar.bz2
android-node-v8-4a408321d9c4a6964c9d89a0dd09067f36b4dbfc.zip
test: cleanup IIFE tests
A number of test files use IIFEs to separate distinct tests from each other in the same file. The project has been moving toward using block scopes and let/const in favor of IIFEs. This commit moves IIFE tests to block scopes. Some additional cleanup such as use of strictEqual() and common.mustCall() is also included. PR-URL: https://github.com/nodejs/node/pull/7694 Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Diffstat (limited to 'test/parallel/test-timers-unref.js')
-rw-r--r--test/parallel/test-timers-unref.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/parallel/test-timers-unref.js b/test/parallel/test-timers-unref.js
index 570c51b9ac..801b34792a 100644
--- a/test/parallel/test-timers-unref.js
+++ b/test/parallel/test-timers-unref.js
@@ -55,11 +55,11 @@ setInterval(function() {
}, SHORT_TIME);
// Should not assert on args.Holder()->InternalFieldCount() > 0. See #4261.
-(function() {
- var t = setInterval(function() {}, 1);
+{
+ const t = setInterval(function() {}, 1);
process.nextTick(t.unref.bind({}));
process.nextTick(t.unref.bind(t));
-})();
+}
process.on('exit', function() {
assert.strictEqual(interval_fired, false,