(nesting, testNumber, status, name, skip, todo, expectFailure)
| 76 | } |
| 77 | |
| 78 | function reportTest(nesting, testNumber, status, name, skip, todo, expectFailure) { |
| 79 | let line = `${indent(nesting)}${status} ${testNumber}`; |
| 80 | |
| 81 | if (name) { |
| 82 | line += ` ${tapEscape(`- ${name}`)}`; |
| 83 | } |
| 84 | |
| 85 | if (skip !== undefined) { |
| 86 | line += ` # SKIP${typeof skip === 'string' && skip.length ? ` ${tapEscape(skip)}` : ''}`; |
| 87 | } else if (todo !== undefined) { |
| 88 | line += ` # TODO${typeof todo === 'string' && todo.length ? ` ${tapEscape(todo)}` : ''}`; |
| 89 | } else if (expectFailure !== undefined) { |
| 90 | line += ` # EXPECTED FAILURE${typeof expectFailure === 'string' ? ` ${tapEscape(expectFailure)}` : ''}`; |
| 91 | } |
| 92 | |
| 93 | line += '\n'; |
| 94 | |
| 95 | return line; |
| 96 | } |
| 97 | |
| 98 | function reportDetails(nesting, data = kEmptyObject, location) { |
| 99 | const { error, duration_ms } = data; |
no test coverage detected