mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 01:39:44 +01:00
Remove invalid Jest storybook coverage config (#12846)
The Jest storybook config was mistakenly set to overwrite the coverage report for our main set of Jest tests. It also had extremely high coverage thresholds set, and the `collectCoverageFrom` config was asking Jest to check that the storybook tests cover all of the UI code. For now the `collectCoverageFrom` config has been removed. I don't understand why we'd want to use Storybook to unit test in the first place, so I don't understand what parts of the codebase we'd want to cover with these tests. So for the moment, only the files touched by the current tests are considered. The coverage output directory is now set to `jest-coverage/storybook` so that it does not overlap with any other coverage reports.
This commit is contained in:
parent
b32bccc11e
commit
d0c1fd713d
@ -1,17 +1,7 @@
|
||||
/* eslint-disable import/unambiguous */
|
||||
module.exports = {
|
||||
collectCoverageFrom: ['<rootDir>/ui/**/*.js'],
|
||||
coverageDirectory: './jest-coverage/main',
|
||||
coveragePathIgnorePatterns: ['.stories.js', '.snap'],
|
||||
coverageDirectory: './jest-coverage/storybook',
|
||||
coverageReporters: ['json', 'lcov', 'text', 'clover'],
|
||||
coverageThreshold: {
|
||||
global: {
|
||||
branches: 35,
|
||||
functions: 37,
|
||||
lines: 43,
|
||||
statements: 43,
|
||||
},
|
||||
},
|
||||
// TODO: enable resetMocks
|
||||
// resetMocks: true,
|
||||
restoreMocks: true,
|
||||
|
Loading…
Reference in New Issue
Block a user