Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Four spaces not two on the test runner.

  • Loading branch information...
commit 52ce470cd34d849d7f89355eac87e39ea782c9dd 1 parent faee84c
@squeeks authored
Showing with 28 additions and 29 deletions.
  1. +28 −29 test/runner.js
View
57 test/runner.js
@@ -4,35 +4,34 @@ var spawn = require('child_process').spawn,
timeout = 10000;
fs.readdir(__dirname, function (e, files) {
- if(e) throw e;
-
- var tests = files.filter(function (f) {return f.substr(-2) === 'js' && f != 'runner.js'});
-
- var next = function () {
- if(tests.length === 0) process.exit(exitCode);
-
- var file = tests.shift();
- var proc = spawn('node', [ 'test/' + file ]);
-
- var killed = false;
- var t = setTimeout(function () {
- proc.kill();
- exitCode += 1;
- console.error(file + ' timeout');
- killed = true;
- }, timeout)
-
- proc.stdout.pipe(process.stdout);
- proc.stderr.pipe(process.stderr);
- proc.on('exit', function (code) {
- if (code && !killed) console.error(file + ' failed');
- exitCode += code || 0;
- clearTimeout(t);
- next();
- })
- }
- next();
-
+ if(e) throw e;
+
+ var tests = files.filter(function (f) {return f.substr(-2) === 'js' && f != 'runner.js'});
+
+ var next = function () {
+ if(tests.length === 0) process.exit(exitCode);
+
+ var file = tests.shift();
+ var proc = spawn('node', [ 'test/' + file ]);
+
+ var killed = false;
+ var t = setTimeout(function () {
+ proc.kill();
+ exitCode += 1;
+ console.error(file + ' timeout');
+ killed = true;
+ }, timeout)
+
+ proc.stdout.pipe(process.stdout);
+ proc.stderr.pipe(process.stderr);
+ proc.on('exit', function (code) {
+ if (code && !killed) console.error(file + ' failed');
+ exitCode += code || 0;
+ clearTimeout(t);
+ next();
+ })
+ }
+ next();
})
Please sign in to comment.
Something went wrong with that request. Please try again.