Skip to content

Commit

Permalink
fix: use default maxCols from Istanbul
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed Jan 22, 2020
1 parent 16d58b2 commit 21fe56f
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 11 deletions.
2 changes: 1 addition & 1 deletion packages/jest-reporters/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
19 changes: 10 additions & 9 deletions packages/jest-reporters/src/coverage_reporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
Expand Down Expand Up @@ -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),
Expand All @@ -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};
Expand Down
9 changes: 8 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 21fe56f

Please sign in to comment.