Skip to content
This repository has been archived by the owner on Nov 25, 2024. It is now read-only.

Commit

Permalink
Merge pull request #149 from jamesramsay/json-stdout
Browse files Browse the repository at this point in the history
Fix: json reporting behaviour should match docs (fixes #148)
  • Loading branch information
James Ramsay committed Jan 4, 2016
2 parents b7a632e + 7415d42 commit c31f390
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ export const BUNYAN_DEFAULTS = {
}],
},
json: {
name: APP_NAME,
streams: [{
stream: process.stdout,
}],
},
['json-err']: {
name: APP_NAME,
streams: [{
stream: process.stderr,
Expand Down
4 changes: 2 additions & 2 deletions src/hercule.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export function transcludeFileSync(input, { relativePath }, log) {
cwd: __dirname,
timeout: SYNC_TIMEOUT,
};
const args = [input, '--reporter', 'json'];
const args = [input, '--reporter', 'json-err'];
const result = childProcess.spawnSync('../bin/hercule', args, options);
const outputContent = result.stdout.toString();
const outputLogs = result.stderr.toString().split('\n');
Expand All @@ -96,7 +96,7 @@ export function transcludeStringSync(input, { relativePath }, log) {
cwd: __dirname,
timeout: SYNC_TIMEOUT,
};
const args = ['--relative', relativePath, '--reporter', 'json'];
const args = ['--relative', relativePath, '--reporter', 'json-err'];
const result = childProcess.spawnSync('../bin/hercule', args, options);
const outputContent = result.stdout.toString();
const outputLogs = result.stderr.toString().split('\n');
Expand Down

0 comments on commit c31f390

Please sign in to comment.