MCPcopy Create free account
hub / github.com/Dart-Code/Dart-Code / constructor

Method constructor

src/test/mocha_coverage_reporter.ts:8–21  ·  view source on GitHub ↗
(runner: Runner, _options: any)

Source from the content-addressed store, hash-verified

6
7export class CoverageReporter extends reporters.Base {
8 constructor(runner: Runner, _options: any) {
9 super(runner);
10
11 runner.once("end", () => {
12 try {
13 if (typeof __coverage__ !== "undefined" && typeof process.env.COVERAGE_OUTPUT !== "undefined" && process.env.COVERAGE_OUTPUT) {
14 fs.writeFileSync(process.env.COVERAGE_OUTPUT, JSON.stringify(__coverage__));
15 }
16 } catch (e) {
17 console.error("Failed to write coverage!");
18 console.error(e);
19 }
20 });
21 }
22}

Callers

nothing calls this directly

Calls 1

errorMethod · 0.65

Tested by

no test coverage detected