(doEnv = false, onlyError = false)
| 111 | } |
| 112 | |
| 113 | end(doEnv = false, onlyError = false) { |
| 114 | /* eslint-disable no-console */ |
| 115 | const displaySteps = onlyError && this.#didFail ? this.#steps.filter((x) => x.lvl === L_WARN || x.lvl === L_ERR): this.#steps |
| 116 | if ( this.#setENV ) { |
| 117 | envLines.push( |
| 118 | this.#getTestSummary(false), |
| 119 | '', |
| 120 | ...this.#steps.map((x) => this.#getDisplayLine(x, false)), |
| 121 | '' |
| 122 | ) |
| 123 | } |
| 124 | |
| 125 | console.log(this.#getTestSummary()) |
| 126 | console.log( |
| 127 | displaySteps.map((x) => this.#getDisplayLine(x)).join('\n'), |
| 128 | '\n' |
| 129 | ) |
| 130 | if ( doEnv ) { |
| 131 | fs.writeFileSync(path.join(__dirname, '..', 'TEST_OUTPUT.md'), ['# Testing Results', '', ...envLines].join('\n')) |
| 132 | } |
| 133 | /* eslint-enable no-console */ |
| 134 | } |
| 135 | } |
| 136 | |
| 137 | module.exports.testLib = testLib |
no test coverage detected