diff --git a/lib/log.js b/lib/log.js new file mode 100644 index 0000000..6e8bcde --- /dev/null +++ b/lib/log.js @@ -0,0 +1,5 @@ +const log = (...args) => { + process.stdout.write(...args) +} + +export { log } \ No newline at end of file diff --git a/reporter/errorreporter.js b/reporter/errorreporter.js index 58e02fd..415b535 100644 --- a/reporter/errorreporter.js +++ b/reporter/errorreporter.js @@ -1,6 +1,5 @@ import chalk from 'chalk' - -const log = (...args) => process.stdout.write(...args) +import { log } from '../lib/log.js' const errorreporter = () => { const report = { diff --git a/reporter/linereporter.js b/reporter/linereporter.js index 13fcdfc..6895635 100644 --- a/reporter/linereporter.js +++ b/reporter/linereporter.js @@ -1,7 +1,6 @@ import chalk from 'chalk' import { stackParser } from '../lib/stackparser.js' - -const log = (...args) => console.log(...args) +import { log } from '../lib/log.js' const linereporter = () => { const lines = [] diff --git a/reporter/summaryreporter.js b/reporter/summaryreporter.js index 36fb160..260b55a 100644 --- a/reporter/summaryreporter.js +++ b/reporter/summaryreporter.js @@ -1,6 +1,5 @@ import chalk from 'chalk' - -const log = (...args) => process.stdout.write(...args) +import { log } from '../lib/log.js' const summaryreporter = () => {