-
Notifications
You must be signed in to change notification settings - Fork 882
/
jest.config.js
38 lines (38 loc) · 1.08 KB
/
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
26
27
28
29
30
31
32
33
34
35
36
37
38
module.exports = {
preset: "@yoast/jest-preset",
setupFilesAfterEnv: [ "<rootDir>/tests/setupTests.js" ],
testPathIgnorePatterns: [
"/tests/__mocks__/",
"/tests/containers/mockSelectors.js",
"/tests/helpers/factory.js",
"/tests/setupTests.js",
"/tests/decorator/__mocks__/@wordpress/rich-text/index.js",
"/tests/test-utils.js",
],
testEnvironment: "jsdom",
testEnvironmentOptions: {
url: "http:https://localhost",
},
moduleNameMapper: {
"\\.(jpg|jpeg|png|gif|eot|otf|webp|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/tests/__mocks__/fileMock.js",
"\\.(svg)$": "<rootDir>/tests/__mocks__/svgMock.js",
"\\.(css|less)$": "<rootDir>/tests/__mocks__/styleMock.js",
"find-with-regex": "<rootDir>/node_modules/find-with-regex/lib/index.js",
"^lodash-es$": "lodash",
"^lodash-es/(.*)$": "lodash/$1",
"@wordpress/i18n": [
"<rootDir>node_modules/@wordpress/i18n",
"<rootDir>/../../node_modules/@wordpress/i18n",
],
},
collectCoverageFrom: [
"src/**/*.{js,jsx,ts,tsx}",
],
coverageReporters: [
"json",
"lcov",
"text",
"clover",
"text-summary",
],
};