Skip to content

Commit 2bc76db

Browse files
authoredFeb 15, 2018
Merge pull request #353 from BridgeAR/master
test: add callbacks
2 parents 5f7f27b + b2a2ab1 commit 2bc76db

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed
 

‎test/bin.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ mkdirp.sync(tmpdir);
1818
fs.writeFileSync(files.main, 'console.log(555)');
1919

2020
test('bin', function (t) {
21-
t.plan(4);
21+
t.plan(5);
2222
var ps = spawn(cmd, [ files.main, '-o', files.bundle, '-v' ]);
2323
var lineNum = 0;
2424
ps.stderr.pipe(split()).on('data', function (line) {
@@ -27,7 +27,7 @@ test('bin', function (t) {
2727
run(files.bundle, function (err, output) {
2828
t.ifError(err);
2929
t.equal(output, '555\n');
30-
fs.writeFile(files.main, 'console.log(333)');
30+
fs.writeFile(files.main, 'console.log(333)', t.ifError);
3131
})
3232
}
3333
else if (lineNum === 2) {

‎test/bin_brfs.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ fs.writeFileSync(files.main, [
2424
fs.writeFileSync(files.lines, 'beep\nboop');
2525

2626
test('bin brfs', function (t) {
27-
t.plan(4);
27+
t.plan(5);
2828
var ps = spawn(cmd, [
2929
files.main,
3030
'-t', require.resolve('brfs'), '-v',
@@ -37,7 +37,7 @@ test('bin brfs', function (t) {
3737
run(files.bundle, function (err, output) {
3838
t.ifError(err);
3939
t.equal(output, 'BEEP\nBOOP\n');
40-
fs.writeFile(files.lines, 'robo-bOOgie');
40+
fs.writeFile(files.lines, 'robo-bOOgie', t.ifError);
4141
})
4242
}
4343
else if (lineNum === 2) {

‎test/bin_pipe.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ mkdirp.sync(tmpdir);
1818
fs.writeFileSync(files.main, 'console.log(num * 2)');
1919

2020
test('bin with pipe', function (t) {
21-
t.plan(4);
21+
t.plan(5);
2222
var ps = spawn(cmd, [
2323
files.main,
2424
'-o', 'uglifyjs - --enclose 11:num > ' + files.bundle,
@@ -31,7 +31,7 @@ test('bin with pipe', function (t) {
3131
run(files.bundle, function (err, output) {
3232
t.ifError(err);
3333
t.equal(output, '22\n');
34-
fs.writeFile(files.main, 'console.log(num * 3)');
34+
fs.writeFile(files.main, 'console.log(num * 3)', t.ifError);
3535
});
3636
}
3737
else if (lineNum === 2) {

‎test/bin_standalone.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ mkdirp.sync(tmpdir);
1818
fs.writeFileSync(files.main, 'console.log(555)');
1919

2020
test('bin with standalone', function (t) {
21-
t.plan(4);
21+
t.plan(5);
2222
var ps = spawn(cmd, [ files.main, '-o', files.bundle, '-v', '-s', 'XXX' ]);
2323
var lineNum = 0;
2424
ps.stderr.pipe(split()).on('data', function (line) {
@@ -27,7 +27,7 @@ test('bin with standalone', function (t) {
2727
run(files.bundle, function (err, output) {
2828
t.ifError(err);
2929
t.equal(output, '555\n');
30-
fs.writeFile(files.main, 'console.log(333)');
30+
fs.writeFile(files.main, 'console.log(333)', t.ifError);
3131
})
3232
}
3333
else if (lineNum === 2) {

0 commit comments

Comments
 (0)
Please sign in to comment.