diff options
author | Roman Reiss <me@silverwind.io> | 2015-05-19 13:00:06 +0200 |
---|---|---|
committer | Roman Reiss <me@silverwind.io> | 2015-05-19 21:21:27 +0200 |
commit | f29762f4dd5811464684f820286f1c90a694bdff (patch) | |
tree | 67ba73a81c3938f41796dfa4c595f9713de59933 /test/parallel/test-microtask-queue-integration-domain.js | |
parent | 85d99830096a48b7d50cc3b0e5c3fba4172c2d02 (diff) | |
download | node-new-f29762f4dd5811464684f820286f1c90a694bdff.tar.gz |
test: enable linting for tests
Enable linting for the test directory. A number of changes was made so
all tests conform the current rules used by lib and src directories. The
only exception for tests is that unreachable (dead) code is allowed.
test-fs-non-number-arguments-throw had to be excluded from the changes
because of a weird issue on Windows CI.
PR-URL: https://github.com/nodejs/io.js/pull/1721
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'test/parallel/test-microtask-queue-integration-domain.js')
-rw-r--r-- | test/parallel/test-microtask-queue-integration-domain.js | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/test/parallel/test-microtask-queue-integration-domain.js b/test/parallel/test-microtask-queue-integration-domain.js index 7e8b9a1250..7a4ad77cd3 100644 --- a/test/parallel/test-microtask-queue-integration-domain.js +++ b/test/parallel/test-microtask-queue-integration-domain.js @@ -1,12 +1,13 @@ +'use strict'; var common = require('../common'); var assert = require('assert'); var domain = require('domain'); var implementations = [ - function (fn) { + function(fn) { Promise.resolve().then(fn); }, - function (fn) { + function(fn) { var obj = {}; Object.observe(obj, fn); @@ -18,20 +19,20 @@ var implementations = [ var expected = 0; var done = 0; -process.on('exit', function () { +process.on('exit', function() { assert.equal(done, expected); }); -function test (scheduleMicrotask) { +function test(scheduleMicrotask) { var nextTickCalled = false; expected++; - scheduleMicrotask(function () { - process.nextTick(function () { + scheduleMicrotask(function() { + process.nextTick(function() { nextTickCalled = true; }); - setTimeout(function () { + setTimeout(function() { assert(nextTickCalled); done++; }, 0); @@ -42,8 +43,8 @@ function test (scheduleMicrotask) { implementations.forEach(test); // tick callback case -setTimeout(function () { - implementations.forEach(function (impl) { +setTimeout(function() { + implementations.forEach(function(impl) { process.nextTick(test.bind(null, impl)); }); }, 0); |