From f5ef39aa8ffeb9e5db781bc683b305e1731d43d5 Mon Sep 17 00:00:00 2001 From: cpojer Date: Tue, 12 Jul 2016 14:43:42 +0900 Subject: [PATCH] Remove dead code in IstanbulTestReporter. --- .../src/reporters/IstanbulTestReporter.js | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/packages/jest-config/src/reporters/IstanbulTestReporter.js b/packages/jest-config/src/reporters/IstanbulTestReporter.js index f34b0a86ba74..06b47135e418 100644 --- a/packages/jest-config/src/reporters/IstanbulTestReporter.js +++ b/packages/jest-config/src/reporters/IstanbulTestReporter.js @@ -23,7 +23,6 @@ const FAIL_COLOR = chalk.bold.red; class IstanbulTestReporter extends DefaultTestReporter { _collector: istanbul.Collector; - _reporter: istanbul.Reporter; _testCollectors: Object; constructor(customProcess: Process) { @@ -31,7 +30,6 @@ class IstanbulTestReporter extends DefaultTestReporter { this._collector = new istanbul.Collector(); this._testCollectors = Object.create(null); - this._reporter = new istanbul.Reporter(); } onTestResult( @@ -54,8 +52,8 @@ class IstanbulTestReporter extends DefaultTestReporter { onRunComplete(config: Config, aggregatedResults: AggregatedResult) { aggregatedResults.success = super.onRunComplete(config, aggregatedResults); - const reporter = this._reporter; if (config.collectCoverage) { + const reporter = new istanbul.Reporter(); try { if (config.coverageDirectory) { reporter.dir = config.coverageDirectory; @@ -111,14 +109,6 @@ class IstanbulTestReporter extends DefaultTestReporter { return aggregatedResults.success; } - getReporter() { - return this._reporter; - } - - getCollector() { - return this._collector; - } - getTestCollectors() { return this._testCollectors; }