UNPKG

867 BJavaScriptView Raw
1import os from 'os';
2import chalk from 'chalk';
3import { MutantStatus } from '@stryker-mutator/api/core';
4export class DotsReporter {
5 onMutantTested(result) {
6 let toLog;
7 switch (result.status) {
8 case MutantStatus.Killed:
9 toLog = '.';
10 break;
11 case MutantStatus.Timeout:
12 toLog = chalk.yellow('T');
13 break;
14 case MutantStatus.Survived:
15 toLog = chalk.bold.red('S');
16 break;
17 case MutantStatus.RuntimeError:
18 toLog = chalk.yellow('E');
19 break;
20 default:
21 toLog = '';
22 break;
23 }
24 process.stdout.write(toLog);
25 }
26 onAllMutantsTested() {
27 process.stdout.write(os.EOL);
28 }
29}
30//# sourceMappingURL=dots-reporter.js.map
\No newline at end of file