export default { // A list of paths to directories that Jest should use to search for files in // https://jestjs.io/docs/configuration#roots-arraystring roots: ['/lib/'], // The test environment that will be used for testing // https://jestjs.io/docs/configuration#testenvironment-string testEnvironment: 'node', setupFilesAfterEnv: ['/jest.setup.ts'], // Jest transformations // https://jestjs.io/docs/configuration#transform-objectstring-pathtotransformer--pathtotransformer-object transform: { '^.+\\.tsx?$': 'ts-jest', // Transform TypeScript files using ts-jest }, // Code coverage config // https://jestjs.io/docs/configuration#collectcoveragefrom-array coverageDirectory: '/coverage/', collectCoverageFrom: ['/lib/**/*.{ts,tsx}', '!**/node_modules/**', '!**/*.d.ts'], coveragePathIgnorePatterns: ['/lib/__utils__/', '/node_modules/'], // If a test hits the RPC limit it could spent over a minute on progressive backoffs until it's // able to get through to the server again so let's be generous here. testTimeout: 90000, testPathIgnorePatterns: ['/__utils__/'], clearMocks: true, };