correct some formatting in the terminal runner
This commit is contained in:
parent
cbf48ff3b1
commit
1d1ae4e91e
1 changed files with 5 additions and 1 deletions
|
@ -58,6 +58,10 @@ const makeSummary = results => {
|
|||
toString() {
|
||||
const summary = `test result: ${failed}. ${passed} passed; ${failed} failed`
|
||||
|
||||
if (failed === 0) {
|
||||
return ''
|
||||
}
|
||||
|
||||
const failures = results
|
||||
.filter(result => result.failed.length)
|
||||
.flatMap(result =>
|
||||
|
@ -76,7 +80,7 @@ export const TerminalRunner = tests => {
|
|||
return {
|
||||
results,
|
||||
toString() {
|
||||
const suites = results.map(r => r.toString())
|
||||
const suites = results.map(r => r.toString()).join('\n')
|
||||
const summary = makeSummary(results).toString()
|
||||
return `${suites}\n${summary}`
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue