(files: File[] = this.ctx.state.getFiles(), errors: unknown[] = this.ctx.state.getUnhandledErrors())
| 380 | } |
| 381 | |
| 382 | onWatcherStart(files: File[] = this.ctx.state.getFiles(), errors: unknown[] = this.ctx.state.getUnhandledErrors()): void { |
| 383 | const failed = errors.length > 0 || hasFailed(files) |
| 384 | |
| 385 | if (failed) { |
| 386 | this.log(withLabel('red', 'FAIL', 'Tests failed. Watching for file changes...')) |
| 387 | } |
| 388 | else if (this.ctx.isCancelling) { |
| 389 | this.log(withLabel('red', 'CANCELLED', 'Test run cancelled. Watching for file changes...')) |
| 390 | } |
| 391 | else { |
| 392 | this.log(withLabel('green', 'PASS', 'Waiting for file changes...')) |
| 393 | } |
| 394 | |
| 395 | const hints = [c.dim('press ') + c.bold('h') + c.dim(' to show help')] |
| 396 | |
| 397 | if (hasFailedSnapshot(files)) { |
| 398 | hints.unshift(c.dim('press ') + c.bold(c.yellow('u')) + c.dim(' to update snapshot')) |
| 399 | } |
| 400 | else { |
| 401 | hints.push(c.dim('press ') + c.bold('q') + c.dim(' to quit')) |
| 402 | } |
| 403 | |
| 404 | this.log(BADGE_PADDING + hints.join(c.dim(', '))) |
| 405 | } |
| 406 | |
| 407 | onWatcherRerun(files: string[], trigger?: string): void { |
| 408 | this.watchFilters = files |
nothing calls this directly
no test coverage detected