1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-26 20:39:08 +01:00
metamask-extension/development/jest.config.js
Mark Stacey 267cdc4e6b
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.
2021-12-01 15:16:34 -03:30

20 lines
504 B
JavaScript

module.exports = {
displayName: '/development',
collectCoverageFrom: ['<rootDir>/**/*.js'],
coverageDirectory: '../jest-coverage/development/',
coverageReporters: ['html', 'text-summary'],
coverageThreshold: {
'./development/build/transforms/**/*.js': {
branches: 100,
functions: 100,
lines: 100,
statements: 100,
},
},
resetMocks: true,
restoreMocks: true,
testEnvironment: 'node',
testMatch: ['<rootDir>/build/**/*.test.js'],
testTimeout: 2500,
};