-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.js
More file actions
executable file
·44 lines (43 loc) · 1.28 KB
/
jest.config.js
File metadata and controls
executable file
·44 lines (43 loc) · 1.28 KB
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
39
40
41
42
43
/*
* @Author: linjianxi
* @Date: 2019-07-29 03:00:10
* @LastEditTime : 2020-01-07 14:53:23
* @Description: file content
*/
module.exports = {
verbose: true,
setupFiles: ["./tests/setup.js"],
moduleFileExtensions: ["ts", "tsx","js", "jsx", "json"],
coveragePathIgnorePatterns: [
"/components/index.tsx",
"/components/styles",
// newFunction(),
// "/components/icon",
// "/components/form",
// "/components/wordPad",
// "/components/dropdown",
// "/components/styles"
],
transformIgnorePatterns: ["/node_modules/", ".history/*", "lib", "dist"],
modulePathIgnorePatterns: ["/.history/", "lib", "dist"],
moduleDirectories: ["node_modules", ".", "src", "src/shared"],
snapshotSerializers: ["enzyme-to-json/serializer"],
collectCoverageFrom: [
"components/**/*.{js,jsx,ts,tsx}",
"!components/**/style.{js,jsx,ts,tsx}"
],
transform: {
"^.+\\.jsx?$": "babel-jest",
"^.+\\.tsx?$": "babel-jest"
},
testURL: "http://localhost",
rootDir: __dirname,
moduleNameMapper: {
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$":
"<rootDir>/tests/__mocks__/fileMock.js",
"\\.(css|less)$": "<rootDir>/tests/__mocks__/styleMock.js"
}
};
function newFunction() {
return "/components/version";
}