mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 01:47:00 +01:00
d3d30fd373
* fix(settings): fixed two IPFS gateway issues - adds back in two bugfixes that were originally in #19283 - fixes #16871 - fixes #18140 - achieves 100% code coverage for /ui/pages/settings/security-tab - removes the npm package `valid-url`, which has not been updated in 10 years * changes after #20172 was merged * improved URL validation (specifically spaces) * better Jest coverage * response to legobeat review * fixing lint and Jest
72 lines
3.1 KiB
JavaScript
72 lines
3.1 KiB
JavaScript
module.exports = {
|
|
collectCoverageFrom: [
|
|
'<rootDir>/app/scripts/constants/error-utils.js',
|
|
'<rootDir>/app/scripts/controllers/permissions/**/*.js',
|
|
'<rootDir>/app/scripts/controllers/sign.ts',
|
|
'<rootDir>/app/scripts/controllers/decrypt-message.ts',
|
|
'<rootDir>/app/scripts/controllers/transactions/etherscan.ts',
|
|
'<rootDir>/app/scripts/controllers/transactions/EtherscanRemoteTransactionSource.ts',
|
|
'<rootDir>/app/scripts/controllers/transactions/IncomingTransactionHelper.ts',
|
|
'<rootDir>/app/scripts/flask/**/*.js',
|
|
'<rootDir>/app/scripts/lib/**/*.(js|ts)',
|
|
'<rootDir>/app/scripts/lib/createRPCMethodTrackingMiddleware.js',
|
|
'<rootDir>/app/scripts/migrations/*.js',
|
|
'<rootDir>/app/scripts/migrations/*.ts',
|
|
'!<rootDir>/app/scripts/migrations/*.test.(js|ts)',
|
|
'<rootDir>/app/scripts/platforms/*.js',
|
|
'<rootDir>/shared/**/*.(js|ts|tsx)',
|
|
'<rootDir>/ui/**/*.(js|ts|tsx)',
|
|
'<rootDir>/development/fitness-functions/**/*.test.(js|ts|tsx)',
|
|
'<rootDir>/test/e2e/helpers.test.js',
|
|
],
|
|
coverageDirectory: './coverage',
|
|
coveragePathIgnorePatterns: ['.stories.*', '.snap'],
|
|
coverageReporters: ['html', 'json'],
|
|
reporters: [
|
|
'default',
|
|
[
|
|
'jest-junit',
|
|
{
|
|
outputDirectory: 'test/test-results/',
|
|
outputName: 'junit.xml',
|
|
},
|
|
],
|
|
],
|
|
// TODO: enable resetMocks
|
|
// resetMocks: true,
|
|
restoreMocks: true,
|
|
setupFiles: ['<rootDir>/test/setup.js', '<rootDir>/test/env.js'],
|
|
setupFilesAfterEnv: ['<rootDir>/test/jest/setup.js'],
|
|
testMatch: [
|
|
'<rootDir>/app/scripts/constants/error-utils.test.js',
|
|
'<rootDir>/app/scripts/controllers/app-state.test.js',
|
|
'<rootDir>/app/scripts/controllers/transactions/etherscan.test.ts',
|
|
'<rootDir>/app/scripts/controllers/transactions/EtherscanRemoteTransactionSource.test.ts',
|
|
'<rootDir>/app/scripts/controllers/transactions/IncomingTransactionHelper.test.ts',
|
|
'<rootDir>/app/scripts/controllers/mmi-controller.test.js',
|
|
'<rootDir>/app/scripts/controllers/permissions/**/*.test.js',
|
|
'<rootDir>/app/scripts/controllers/sign.test.ts',
|
|
'<rootDir>/app/scripts/controllers/decrypt-message.test.ts',
|
|
'<rootDir>/app/scripts/flask/**/*.test.js',
|
|
'<rootDir>/app/scripts/lib/**/*.test.(js|ts)',
|
|
'<rootDir>/app/scripts/lib/createRPCMethodTrackingMiddleware.test.js',
|
|
'<rootDir>/app/scripts/migrations/*.test.(js|ts)',
|
|
'<rootDir>/app/scripts/platforms/*.test.js',
|
|
'<rootDir>/app/scripts/translate.test.ts',
|
|
'<rootDir>/shared/**/*.test.(js|ts)',
|
|
'<rootDir>/ui/**/*.test.(js|ts|tsx)',
|
|
'<rootDir>/development/fitness-functions/**/*.test.(js|ts|tsx)',
|
|
'<rootDir>/test/e2e/helpers.test.js',
|
|
],
|
|
testTimeout: 5500,
|
|
// We have to specify the environment we are running in, which is jsdom. The
|
|
// default is 'node'. This can be modified *per file* using a comment at the
|
|
// head of the file. So it may be worthwhile to switch to 'node' in any
|
|
// background tests.
|
|
testEnvironment: 'jsdom',
|
|
testEnvironmentOptions: {
|
|
customExportConditions: ['node', 'node-addons'],
|
|
},
|
|
workerIdleMemoryLimit: '500MB',
|
|
};
|