Skip to content

Commit

Permalink
fix integration helper json failure output
Browse files Browse the repository at this point in the history
  • Loading branch information
boneskull committed Feb 7, 2019
1 parent 2abc1a8 commit 9b4c6f0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 17 deletions.
8 changes: 4 additions & 4 deletions test/integration/helpers.js
Expand Up @@ -81,10 +81,10 @@ module.exports = {
var path;

path = resolveFixturePath(fixturePath);
args = args || [];
args = (args || []).concat('--reporter', 'json', path);

return invokeMocha(
args.concat(['--reporter', 'json', path]),
args,
function(err, res) {
if (err) return fn(err);

Expand All @@ -95,8 +95,8 @@ module.exports = {
fn(
new Error(
format(
'Failed to parse JSON reporter output.\nArgs: %O\nResult:\n\n%O',
args,
'Failed to parse JSON reporter output. Error:\n%O\nResponse:\n%O',
err,
res
)
)
Expand Down
18 changes: 5 additions & 13 deletions test/integration/options/debug.spec.js
Expand Up @@ -19,10 +19,7 @@ describe('--debug', function() {
if (err) {
return done(err);
}
expect(res, 'to have passed').and(
'to contain output',
/Debugger listening/i
);
expect(res, 'to contain output', /Debugger listening/i);
done();
},
'pipe'
Expand All @@ -36,10 +33,7 @@ describe('--debug', function() {
if (err) {
return done(err);
}
expect(res, 'to have passed').and(
'to contain output',
/Debugger listening/i
);
expect(res, 'to contain output', /Debugger listening/i);
done();
},
'pipe'
Expand All @@ -58,7 +52,8 @@ describe('--debug', function() {
if (err) {
return done(err);
}
expect(res, 'to have passed').and(
expect(
res,
'to contain output',
/Debugger listening on .*127.0.0.1:9229/i
);
Expand All @@ -75,10 +70,7 @@ describe('--debug', function() {
if (err) {
return done(err);
}
expect(res, 'to have passed').and(
'to contain output',
/"--debug" is not available/i
);
expect(res, 'to contain output', /"--debug" is not available/i);
done();
},
'pipe'
Expand Down

0 comments on commit 9b4c6f0

Please sign in to comment.