mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-24 02:58:09 +01:00
267cdc4e6b
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.
17 lines
547 B
JavaScript
17 lines
547 B
JavaScript
/* eslint-disable import/unambiguous */
|
|
module.exports = {
|
|
coverageDirectory: './jest-coverage/storybook',
|
|
coverageReporters: ['html', 'text-summary'],
|
|
// 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',
|
|
},
|
|
};
|