mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 18:00:18 +01:00
d0c1fd713d
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.
17 lines
557 B
JavaScript
17 lines
557 B
JavaScript
/* eslint-disable import/unambiguous */
|
|
module.exports = {
|
|
coverageDirectory: './jest-coverage/storybook',
|
|
coverageReporters: ['json', 'lcov', 'text', 'clover'],
|
|
// TODO: enable resetMocks
|
|
// resetMocks: true,
|
|
restoreMocks: true,
|
|
setupFiles: ['<rootDir>/test/setup.js', '<rootDir>/test/env.js'],
|
|
setupFilesAfterEnv: ['<rootDir>/test/jest/setup.js'],
|
|
testMatch: ['<rootDir>/ui/**/*stories.test.js'],
|
|
testTimeout: 2500,
|
|
transform: {
|
|
'^.+\\.[tj]sx?$': 'babel-jest',
|
|
'^.+\\.mdx$': '@storybook/addon-docs/jest-transform-mdx',
|
|
},
|
|
};
|