forked from mallfoundry/taroify
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
37 lines (36 loc) · 1.04 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
/*
* For a detailed explanation regarding each configuration property, visit:
* https://jestjs.io/docs/en/configuration.html
*/
module.exports = {
globals: {
window: true,
DEPRECATED_ADAPTER_COMPONENT: false,
ENABLE_INNER_HTML: true,
ENABLE_ADJACENT_HTML: true,
ENABLE_SIZE_APIS: true,
ENABLE_TEMPLATE_CONTENT: true,
ENABLE_CLONE_NODE: true,
ENABLE_CONTAINS: true,
ENABLE_MUTATION_OBSERVER: true,
},
clearMocks: true,
coverageDirectory: "coverage",
moduleNameMapper: {
"@tarojs/taro": "@tarojs/taro-h5",
"@tarojs/components": "@tarojs/components/lib/react",
},
setupFilesAfterEnv: ["<rootDir>/jest/jest-setup.ts"],
testEnvironment: "jest-environment-jsdom",
testMatch: [
"<rootDir>/packages/**/__tests__/**/*.[jt]s?(x)",
"<rootDir>/packages/**/?(*.)+(spec|test).[tj]s?(x)",
],
transform: {
"^.+\\.(js|jsx|ts|tsx)$": "<rootDir>/node_modules/babel-jest",
},
transformIgnorePatterns: [
"<rootDir>/node_modules/(?!@taro|lodash-es)",
"^.+\\.(css|sass|scss|less)$",
],
}