1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-22 03:12:42 +02:00

Update Jest coverage reporters (#12845)

The coverage reporter for the console has been changed from `text` to
`text-summary` because `text` was too long. It exceeded the maximum
length of the CircleCI terminal output shown on their jobs page, making
it very difficult to see why the unit test coverage job failed.

The text summary only displays overall coverage metrics, but that is
usually enough to indicate when the test fails due to a drop in
coverage. The more detailed breakdown is still available as a HTML
report linked in the `metamaskbot` comment, and in the `jest-coverage`
directory when run locally.

The three on-disk coverage reports used previously (`lcov`, `json`, and
`clover`) have been replaced with just `html`. The HTML report was part
of the `lcov` report, and it was the only one we were using.
This commit is contained in:
Mark Stacey 2021-12-01 15:16:34 -03:30 committed by GitHub
parent b6b202ca13
commit 267cdc4e6b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -2,7 +2,7 @@ module.exports = {
displayName: '/development',
collectCoverageFrom: ['<rootDir>/**/*.js'],
coverageDirectory: '../jest-coverage/development/',
coverageReporters: ['json', 'lcov', 'text', 'clover'],
coverageReporters: ['html', 'text-summary'],
coverageThreshold: {
'./development/build/transforms/**/*.js': {
branches: 100,

View File

@ -2,7 +2,7 @@ module.exports = {
collectCoverageFrom: ['<rootDir>/ui/**/*.js', '<rootDir>/shared/**/*.js'],
coverageDirectory: './jest-coverage/main',
coveragePathIgnorePatterns: ['.stories.js', '.snap'],
coverageReporters: ['json', 'lcov', 'text', 'clover'],
coverageReporters: ['html', 'text-summary'],
coverageThreshold: {
global: {
branches: 35,

View File

@ -1,7 +1,7 @@
/* eslint-disable import/unambiguous */
module.exports = {
coverageDirectory: './jest-coverage/storybook',
coverageReporters: ['json', 'lcov', 'text', 'clover'],
coverageReporters: ['html', 'text-summary'],
// TODO: enable resetMocks
// resetMocks: true,
restoreMocks: true,