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