* @param {object} browser * @return {Promise } * @private
(browser)
| 140 | * @private |
| 141 | */ |
| 142 | async function karmaBrowserComplete_(browser) { |
| 143 | const result = browser.lastResult; |
| 144 | result.total = result.success + result.failed + result.skipped; |
| 145 | // This used to be a warning with karma-browserify. See #16851 and #24957. |
| 146 | // Now, with karma-esbuild, this is a fatal error. See #34040. |
| 147 | if (result.total == 0) { |
| 148 | log( |
| 149 | red('ERROR:'), |
| 150 | 'Karma returned a result with zero tests.', |
| 151 | 'This usually indicates a transformation error. See logs above.' |
| 152 | ); |
| 153 | log(cyan(JSON.stringify(result))); |
| 154 | process.exit(1); |
| 155 | } |
| 156 | } |
| 157 | |
| 158 | /** |
| 159 | * @private |