module.exports = { collectCoverageFrom: [ '/app/scripts/constants/error-utils.js', '/app/scripts/controllers/network/**/*.js', '/app/scripts/controllers/permissions/**/*.js', '/app/scripts/flask/**/*.js', '/app/scripts/lib/**/*.js', '/app/scripts/lib/createRPCMethodTrackingMiddleware.js', '/app/scripts/migrations/*.js', '/app/scripts/platforms/*.js', '/shared/**/*.js', '/ui/**/*.js', ], coverageDirectory: './coverage', coveragePathIgnorePatterns: ['.stories.js', '.snap'], coverageReporters: ['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', '/test/jest/env.js', // jest specific env vars that break mocha tests ], setupFilesAfterEnv: ['/test/jest/setup.js'], testMatch: [ '/app/scripts/constants/error-utils.test.js', '/app/scripts/controllers/network/**/*.test.js', '/app/scripts/controllers/permissions/**/*.test.js', '/app/scripts/flask/**/*.test.js', '/app/scripts/lib/**/*.test.js', '/app/scripts/lib/createRPCMethodTrackingMiddleware.test.js', '/app/scripts/migrations/*.test.js', '/app/scripts/platforms/*.test.js', '/shared/**/*.test.(js|ts)', '/ui/**/*.test.(js|ts)', ], testTimeout: 2500, // 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', };