1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-22 11:22:43 +02:00
metamask-extension/jest.config.js
Daniel e7d7d24d83
Reduce calls of the /featureFlag API (#10859)
* Remove periodic calls to the /featureFlag API

* Always show the Swap button on the main page

* Check if the Swaps feature is enabled, show loading animation while waiting

* Reuse an existing useEffect call

* Use ‘isFeatureFlagLoaded’ in React’s state, resolve lint issues

* Add a watch mode for Jest testing

* Add unit tests for Swaps: fetchSwapsLiveness, add /ducks/swaps into Jest testing

* Remove Swaps Jest tests from Mocha’s ESLint rules

* Ignore Swaps Jest tests while running Mocha, update paths

* Increase test coverage to the current max

* Fix ESLint issues for Swaps

* Enable the Swaps feature by default and after state reset, remove loading screen before seeing Swaps

* Update Jest config, fix tests

* Update Jest coverage threshold to the current maximum

* Update ESLint rule in jest.config.js

* Disable the “Review Swap” button if the feature flag hasn’t loaded yet

* Update jest threshold
2021-04-14 04:46:27 -02:30

15 lines
331 B
JavaScript

module.exports = {
restoreMocks: true,
coverageDirectory: 'jest-coverage/',
coverageThreshold: {
global: {
branches: 5.83,
functions: 8.28,
lines: 11.18,
statements: 11.21,
},
},
setupFiles: ['./test/setup.js', './test/env.js'],
testMatch: ['<rootDir>/ui/app/**/swaps/**/*.test.js'],
};