summaryrefslogtreecommitdiff
path: root/test/timers
diff options
context:
space:
mode:
authorRoman Reiss <me@silverwind.io>2015-05-19 13:00:06 +0200
committerRoman Reiss <me@silverwind.io>2015-05-19 21:21:27 +0200
commitf29762f4dd5811464684f820286f1c90a694bdff (patch)
tree67ba73a81c3938f41796dfa4c595f9713de59933 /test/timers
parent85d99830096a48b7d50cc3b0e5c3fba4172c2d02 (diff)
downloadnode-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/timers')
-rw-r--r--test/timers/test-timers-reliability.js17
1 files changed, 9 insertions, 8 deletions
diff --git a/test/timers/test-timers-reliability.js b/test/timers/test-timers-reliability.js
index c240a44685..b4332468bc 100644
--- a/test/timers/test-timers-reliability.js
+++ b/test/timers/test-timers-reliability.js
@@ -1,3 +1,4 @@
+'use strict';
// FaketimeFlags: --exclude-monotonic -f '2014-07-21 09:00:00'
var common = require('../common');
@@ -31,23 +32,23 @@ var intervalFired = false;
*/
var monoTimer = new Timer();
-monoTimer.ontimeout = function () {
+monoTimer.ontimeout = function() {
/*
* Make sure that setTimeout's and setInterval's callbacks have
* already fired, otherwise it means that they are vulnerable to
* time drifting or inconsistent time changes.
*/
- assert(timerFired);
- assert(intervalFired);
+ assert(timerFired);
+ assert(intervalFired);
};
monoTimer.start(300, 0);
-var timer = setTimeout(function () {
- timerFired = true;
+var timer = setTimeout(function() {
+ timerFired = true;
}, 200);
-var interval = setInterval(function () {
- intervalFired = true;
- clearInterval(interval);
+var interval = setInterval(function() {
+ intervalFired = true;
+ clearInterval(interval);
}, 200);