forked from mallfoundry/taroify
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.js
More file actions
23 lines (22 loc) · 766 Bytes
/
jest.config.js
File metadata and controls
23 lines (22 loc) · 766 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/*
* For a detailed explanation regarding each configuration property, visit:
* https://jestjs.io/docs/en/configuration.html
*/
module.exports = {
clearMocks: true,
coverageDirectory: "coverage",
moduleNameMapper: {
"@tarojs/components": "@tarojs/components/dist-h5/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",
"^.+\\.esm.js?$": "<rootDir>/node_modules/ts-jest",
},
transformIgnorePatterns: ["<rootDir>/node_modules/(?!@taro)", "^.+\\.(css|sass|scss|less)$"],
}