-
Notifications
You must be signed in to change notification settings - Fork 139
/
e2e-jest.js
31 lines (31 loc) · 892 Bytes
/
e2e-jest.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
26
27
28
29
30
31
module.exports = {
moduleNameMapper: {
'\\.(scss|css)$': require.resolve(
'@wordpress/jest-preset-default/scripts/style-mock.js'
),
// See https://github.com/facebook/jest/issues/11100#issuecomment-967161978
'@eslint/eslintrc': '@eslint/eslintrc/dist/eslintrc-universal.cjs',
},
modulePaths: [ '<rootDir>' ],
setupFiles: [
require.resolve(
'@wordpress/jest-preset-default/scripts/setup-globals.js'
),
],
setupFilesAfterEnv: [
require.resolve(
'@wordpress/jest-preset-default/scripts/setup-test-framework.js'
),
],
snapshotSerializers: [ require.resolve( 'enzyme-to-json/serializer.js' ) ],
testEnvironment: 'jsdom',
testMatch: [
'**/__tests__/**/*.[jt]s?(x)',
'**/test/*.[jt]s?(x)',
'**/?(*.)test.[jt]s?(x)',
],
testPathIgnorePatterns: [ '/node_modules/', '<rootDir>/vendor/' ],
transform: {
'\\.[jt]sx?$': require.resolve( 'babel-jest' ),
},
};