(type, data)
| 58 | return ArrayPrototypeJoin(results, '\n'); |
| 59 | } |
| 60 | #handleTestReportEvent(type, data) { |
| 61 | const subtest = ArrayPrototypeShift(this.#stack); // This is the matching `test:start` event |
| 62 | if (subtest) { |
| 63 | assert(subtest.type === 'test:start'); |
| 64 | assert(subtest.data.nesting === data.nesting); |
| 65 | assert(subtest.data.name === data.name); |
| 66 | } |
| 67 | let prefix = ''; |
| 68 | while (this.#stack.length) { |
| 69 | // Report all the parent `test:start` events |
| 70 | const parent = ArrayPrototypePop(this.#stack); |
| 71 | assert(parent.type === 'test:start'); |
| 72 | const msg = parent.data; |
| 73 | ArrayPrototypeUnshift(this.#reported, msg); |
| 74 | prefix += `${indent(msg.nesting)}${reporterUnicodeSymbolMap['arrow:right']}${msg.name}\n`; |
| 75 | } |
| 76 | const indentation = indent(data.nesting); |
| 77 | return `${formatTestReport(type, data, false, prefix, indentation)}\n`; |
| 78 | } |
| 79 | #handleEvent({ type, data }) { |
| 80 | switch (type) { |
| 81 | case 'test:fail': |
no test coverage detected