module.exports = { collectCoverageFrom: [ '/app/scripts/constants/error-utils.js', '/app/scripts/controllers/permissions/**/*.js', '/app/scripts/controllers/sign.ts', '/app/scripts/controllers/decrypt-message.ts', '/app/scripts/controllers/transactions/etherscan.ts', '/app/scripts/controllers/transactions/EtherscanRemoteTransactionSource.ts', '/app/scripts/controllers/transactions/IncomingTransactionHelper.ts', '/app/scripts/flask/**/*.js', '/app/scripts/lib/**/*.(js|ts)', '/app/scripts/lib/createRPCMethodTrackingMiddleware.js', '/app/scripts/migrations/*.js', '/app/scripts/migrations/*.ts', '!/app/scripts/migrations/*.test.(js|ts)', '/app/scripts/platforms/*.js', '/shared/**/*.(js|ts|tsx)', '/ui/**/*.(js|ts|tsx)', '/development/fitness-functions/**/*.test.(js|ts|tsx)', '/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: ['/test/setup.js', '/test/env.js'], setupFilesAfterEnv: ['/test/jest/setup.js'], testMatch: [ '/app/scripts/constants/error-utils.test.js', '/app/scripts/controllers/app-state.test.js', '/app/scripts/controllers/transactions/etherscan.test.ts', '/app/scripts/controllers/transactions/EtherscanRemoteTransactionSource.test.ts', '/app/scripts/controllers/transactions/IncomingTransactionHelper.test.ts', '/app/scripts/controllers/mmi-controller.test.js', '/app/scripts/controllers/permissions/**/*.test.js', '/app/scripts/controllers/sign.test.ts', '/app/scripts/controllers/decrypt-message.test.ts', '/app/scripts/flask/**/*.test.js', '/app/scripts/lib/**/*.test.(js|ts)', '/app/scripts/lib/createRPCMethodTrackingMiddleware.test.js', '/app/scripts/migrations/*.test.(js|ts)', '/app/scripts/platforms/*.test.js', '/app/scripts/translate.test.ts', '/shared/**/*.test.(js|ts)', '/ui/**/*.test.(js|ts|tsx)', '/development/fitness-functions/**/*.test.(js|ts|tsx)', '/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', };