Skip to content

Commit 2cd3314

Browse files
authored
send logger http output from child process (#3462)
1 parent 6c727ee commit 2cd3314

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

lib/reporter/global-reporter.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ module.exports = class GlobalReporter {
5555
});
5656
}
5757

58-
addTestSuiteResults(testResults) {
58+
addTestSuiteResults(testResults, httpOutput) {
5959
testResults = testResults || {};
60-
testResults.httpOutput = Logger.collectOutput().map(item => {
60+
testResults.httpOutput = (httpOutput || Logger.collectOutput()).map(item => {
6161
return [item[0], this.ansiConverter.toHtml(item[1]),
6262
(item[2] ? this.ansiConverter.toHtml(item[2]) : '')];
6363
});
@@ -71,7 +71,7 @@ module.exports = class GlobalReporter {
7171
if (!Concurrency.isTestWorker()) {
7272
emitter.on('message', data => {
7373
data = JSON.parse(data);
74-
this.addTestSuiteResults(data.results);
74+
this.addTestSuiteResults(data.results, data.httpOutput);
7575
});
7676
}
7777
}

lib/testsuite/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,8 @@ class TestSuite {
598598
process.send(SafeJSON.stringify({
599599
type: 'testsuite_finished',
600600
itemKey: process.env.__NIGHTWATCH_ENV_LABEL,
601-
results: this.reporter.exportResults()
601+
results: this.reporter.exportResults(),
602+
httpOutput: Logger.collectOutput()
602603
}));
603604
}
604605

0 commit comments

Comments
 (0)