Skip to content

Commit d93d3e3

Browse files
committed
1 parent e721508 commit d93d3e3

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

test/double_end.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
var test = require('tap').test;
2+
var path = require('path');
23
var concat = require('concat-stream');
34
var spawn = require('child_process').spawn;
45

56
test(function (t) {
67
t.plan(2);
7-
var ps = spawn(process.execPath,
8-
[ require('path').join(__dirname, 'double_end', 'double.js') ]);
8+
var ps = spawn(process.execPath, [path.join(__dirname, 'double_end', 'double.js')]);
99
ps.on('exit', function (code) {
1010
t.equal(code, 1);
1111
});

test/exit.js

+5-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
var tap = require('tap');
2+
var path = require('path');
23
var spawn = require('child_process').spawn;
34
var concat = require('concat-stream');
45

@@ -26,8 +27,7 @@ tap.test('exit ok', function (t) {
2627
].join('\n'));
2728
}
2829

29-
var ps = spawn(process.execPath,
30-
[ require('path').join(__dirname, 'exit', 'ok.js') ]);
30+
var ps = spawn(process.execPath, [path.join(__dirname, 'exit', 'ok.js')]);
3131
ps.stdout.pipe(concat(tc));
3232
ps.on('exit', function (code) {
3333
t.equal(code, 0);
@@ -59,8 +59,7 @@ tap.test('exit fail', function (t) {
5959
].join('\n') + '\n\n');
6060
};
6161

62-
var ps = spawn(process.execPath,
63-
[ require('path').join(__dirname, 'exit', 'fail.js') ]);
62+
var ps = spawn(process.execPath, [path.join(__dirname, 'exit', 'fail.js')]);
6463
ps.stdout.pipe(concat(tc));
6564
ps.on('exit', function (code) {
6665
t.notEqual(code, 0);
@@ -93,7 +92,7 @@ tap.test('too few exit', function (t) {
9392
].join('\n') + '\n\n');
9493
};
9594

96-
var ps = spawn(process.execPath, [ __dirname + '/exit/too_few.js' ]);
95+
var ps = spawn(process.execPath, [path.join(__dirname, '/exit/too_few.js')]);
9796
ps.stdout.pipe(concat(tc));
9897
ps.on('exit', function (code) {
9998
t.notEqual(code, 0);
@@ -124,7 +123,7 @@ tap.test('more planned in a second test', function (t) {
124123
].join('\n') + '\n\n');
125124
};
126125

127-
var ps = spawn(process.execPath, [ __dirname + '/exit/second.js' ]);
126+
var ps = spawn(process.execPath, [path.join(__dirname, '/exit/second.js')]);
128127
ps.stdout.pipe(concat(tc));
129128
ps.on('exit', function (code) {
130129
t.notEqual(code, 0);

test/max_listeners.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
var spawn = require('child_process').spawn;
2-
var ps = spawn(process.execPath,
3-
[ require('path').join(__dirname, 'max_listeners', 'source.js') ]);
2+
var path = require('path');
3+
4+
var ps = spawn(process.execPath, [path.join(__dirname, 'max_listeners', 'source.js')]);
5+
46
ps.stdout.pipe(process.stdout, { end : false });
57

68
ps.stderr.on('data', function (buf) {

0 commit comments

Comments
 (0)