-
Notifications
You must be signed in to change notification settings - Fork 5
/
jest.config.js
34 lines (33 loc) · 1.15 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
module.exports = {
setupFiles: ["./test/setup.js"],
moduleFileExtensions: ["js", "jsx", "json"],
// coveragePathIgnorePatterns: [
// "/components/index.js",
// "/components/styles",
// "/components/version",
// "/components/icon",
// "/components/form",
// "/components/wordPad",
// "/components/dropdown",
// "/components/styles"
// ],
transformIgnorePatterns: ["/node_modules/", ".history/*", "lib", "dist"],
testPathIgnorePatterns:['/node_modules/',"lib","dist","demo"],
modulePathIgnorePatterns: ["/.history/", "lib", "dist"],
moduleDirectories: ["node_modules", ".", "src"],
snapshotSerializers: ["enzyme-to-json/serializer"],
collectCoverageFrom: [
"components/**/*.{js,jsx}",
"!components/**/style.{js,jsx}"
],
transform: {
"^.+\\.jsx?$": "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"
}
};