diff --git a/packages/jest-reporters/package.json b/packages/jest-reporters/package.json index 2458c9f50d0f..f37d6dc4bb26 100644 --- a/packages/jest-reporters/package.json +++ b/packages/jest-reporters/package.json @@ -36,7 +36,7 @@ "@types/glob": "^7.1.1", "@types/istanbul-lib-coverage": "^2.0.0", "@types/istanbul-lib-instrument": "^1.7.2", - "@types/istanbul-lib-report": "^1.1.0", + "@types/istanbul-lib-report": "^3.0.0", "@types/istanbul-lib-source-maps": "^1.2.1", "@types/istanbul-reports": "^1.1.0", "@types/node-notifier": "^5.4.0", diff --git a/packages/jest-reporters/src/coverage_reporter.ts b/packages/jest-reporters/src/coverage_reporter.ts index 09ce73f3f39f..27d6dbee0481 100644 --- a/packages/jest-reporters/src/coverage_reporter.ts +++ b/packages/jest-reporters/src/coverage_reporter.ts @@ -105,7 +105,7 @@ export default class CoverageReporter extends BaseReporter { } coverageReporters.forEach(reporter => { istanbulReports - .create(reporter, {maxCols: process.stdout.columns || Infinity}) + .create(reporter) // @ts-ignore .execute(reportContext); }); @@ -492,7 +492,6 @@ export default class CoverageReporter extends BaseReporter { transformedCoverage.forEach(res => map.merge(res)); const reportContext = istanbulReport.createContext({ - // @ts-ignore coverageMap: map, dir: this._globalConfig.coverageDirectory, watermarks: getWatermarks(this._globalConfig), @@ -502,14 +501,16 @@ export default class CoverageReporter extends BaseReporter { } const map = await this._sourceMapStore.transformCoverage(this._coverageMap); - const reportContext = istanbulReport.createContext({ - // @ts-ignore - coverageMap: map, - dir: this._globalConfig.coverageDirectory, + const reportContext = istanbulReport.createContext( // @ts-ignore - sourceFinder: this._sourceMapStore.sourceFinder, - watermarks: getWatermarks(this._globalConfig), - }); + { + coverageMap: map, + dir: this._globalConfig.coverageDirectory, + // @ts-ignore + sourceFinder: this._sourceMapStore.sourceFinder, + watermarks: getWatermarks(this._globalConfig), + }, + ); // @ts-ignore return {map, reportContext}; diff --git a/yarn.lock b/yarn.lock index 671eedccbdca..755d0269436c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2079,13 +2079,20 @@ "@types/istanbul-lib-coverage" "*" source-map "^0.6.1" -"@types/istanbul-lib-report@*", "@types/istanbul-lib-report@^1.1.0": +"@types/istanbul-lib-report@*": version "1.1.1" resolved "https://registry.yarnpkg.com/@types/istanbul-lib-report/-/istanbul-lib-report-1.1.1.tgz#e5471e7fa33c61358dd38426189c037a58433b8c" integrity sha512-3BUTyMzbZa2DtDI2BkERNC6jJw2Mr2Y0oGI7mRxYNBPxppbtEK1F66u3bKwU2g+wxwWI7PAoRpJnOY1grJqzHg== dependencies: "@types/istanbul-lib-coverage" "*" +"@types/istanbul-lib-report@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz#c14c24f18ea8190c118ee7562b7ff99a36552686" + integrity sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg== + dependencies: + "@types/istanbul-lib-coverage" "*" + "@types/istanbul-lib-source-maps@^1.2.1": version "1.2.2" resolved "https://registry.yarnpkg.com/@types/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.2.tgz#492cb4d6cb0a96d75f1ed7f55bce46851bc13fc1"