MCPcopy Create free account
hub / github.com/SoCreate/angular-playground / compileReport

Method compileReport

projects/cli/src/error-reporter.ts:39–59  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

37 }
38
39 compileReport() {
40 let reporter: Reporter;
41 switch (this.type) {
42 case REPORT_TYPE.LOG:
43 console.error(chalk.red('Error in the following scenarios'));
44 this._errors.forEach(e => {
45 console.log(e.scenario);
46 console.log(e.descriptions);
47 });
48 break;
49 case REPORT_TYPE.JSON:
50 const scenarioNames = this.scenarios.map(s => `${s.name}: ${s.description}`);
51 reporter = new JSONReporter(this.errors, scenarioNames);
52 writeFileSync(this.filename, reporter.getReport());
53 break;
54 case REPORT_TYPE.XML:
55 reporter = new XMLReporter(this.errors, this.scenarios);
56 writeFileSync(this.filename, reporter.getReport());
57 break;
58 }
59 }
60}

Callers 2

mainFunction · 0.80

Calls 1

getReportMethod · 0.45

Tested by

no test coverage detected