forked from newscorp-ghfb/NewsKit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
25 lines (25 loc) · 1014 Bytes
/
jest.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// These combined settings are now only used by the old-style "yarn test:unit:watch",
// as the nx-based test commands use a separate coverage folder per project
module.exports = {
projects: ['<rootDir>/src/jest.config.js', '<rootDir>/site/jest.config.js'],
coveragePathIgnorePatterns: ['/node_modules/', '<rootDir>/test'],
coverageReporters: ['lcov', 'text-summary'],
collectCoverage: true,
coverageDirectory: './coverage/all',
snapshotSerializers: ['@emotion/jest/serializer'],
preset: './jest.preset.js',
transform: {
'^(?!.*\\.(js|jsx|ts|tsx|css|json)$)': '@nrwl/react/plugins/jest',
'^.+\\.[tj]sx?$': ['babel-jest', {presets: ['@nrwl/react/babel']}],
},
setupFilesAfterEnv: [
'<rootDir>/src/test/test-framework-setup.ts',
'@testing-library/jest-dom/extend-expect',
],
testEnvironment: 'jsdom',
testPathIgnorePatterns: ['/node_modules/', '/dist/', '/src/theme-checker/'],
testEnvironmentOptions: {
url: 'http://localhost/',
},
workerIdleMemoryLimit: 0.4,
};