Skip to content

Commit cda26a3

Browse files
committed
Make it clear why subprocess tests fail given missing dependencies
1 parent 7fd160c commit cda26a3

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

test/requests.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const targets = require('../src/targets')
88
const shell = require('child_process')
99
const util = require('util')
1010

11-
require('should')
11+
const should = require('should')
1212

1313
const base = './test/fixtures/output/'
1414
const requests = [
@@ -40,6 +40,11 @@ fixtures.cli.forEach(function (cli) {
4040
})
4141

4242
ls.on('exit', function (code) {
43+
if (code !== 0) {
44+
console.error(stdout)
45+
should.fail(0, code, `Process '${cli.run.split(' ')[0]}' exited unexpectedly with code ${code}`)
46+
}
47+
4348
let har
4449
try {
4550
har = JSON.parse(stdout)

0 commit comments

Comments
 (0)