-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathjest.config.ts
66 lines (65 loc) · 3.21 KB
/
jest.config.ts
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
import type { Config } from "@jest/types";
const config: Config.InitialOptions = {
setupFilesAfterEnv: ["./jest.setup.tsx"],
testEnvironment: "jsdom",
verbose: true,
moduleNameMapper: {
// core
"@nimbus-ds/styles": "<rootDir>/packages/core/styles/src",
"@nimbus-ds/typings": "<rootDir>/packages/core/typings/src",
// atomics
"@nimbus-ds/badge": "<rootDir>/packages/react/src/atomic/Badge/src",
"@nimbus-ds/box": "<rootDir>/packages/react/src/atomic/Box/src",
"@nimbus-ds/button": "<rootDir>/packages/react/src/atomic/Button/src",
"@nimbus-ds/checkbox": "<rootDir>/packages/react/src/atomic/Checkbox/src",
"@nimbus-ds/chip": "<rootDir>/packages/react/src/atomic/Chip/src",
"@nimbus-ds/file-uploader":
"<rootDir>/packages/react/src/atomic/FileUploader/src",
"@nimbus-ds/icon": "<rootDir>/packages/react/src/atomic/Icon/src",
"@nimbus-ds/icon-button":
"<rootDir>/packages/react/src/atomic/IconButton/src",
"@nimbus-ds/input": "<rootDir>/packages/react/src/atomic/Input/src",
"@nimbus-ds/label": "<rootDir>/packages/react/src/atomic/Label/src",
"@nimbus-ds/link": "<rootDir>/packages/react/src/atomic/Link/src",
"@nimbus-ds/list": "<rootDir>/packages/react/src/atomic/List/src",
"@nimbus-ds/popover": "<rootDir>/packages/react/src/atomic/Popover/src",
"@nimbus-ds/radio": "<rootDir>/packages/react/src/atomic/Radio/src",
"@nimbus-ds/select": "<rootDir>/packages/react/src/atomic/Select/src",
"@nimbus-ds/skeleton": "<rootDir>/packages/react/src/atomic/Skeleton/src",
"@nimbus-ds/spinner": "<rootDir>/packages/react/src/atomic/Spinner/src",
"@nimbus-ds/tag": "<rootDir>/packages/react/src/atomic/Tag/src",
"@nimbus-ds/text": "<rootDir>/packages/react/src/atomic/Text/src",
"@nimbus-ds/textarea": "<rootDir>/packages/react/src/atomic/Textarea/src",
"@nimbus-ds/thumbnail": "<rootDir>/packages/react/src/atomic/Thumbnail/src",
"@nimbus-ds/title": "<rootDir>/packages/react/src/atomic/Title/src",
"@nimbus-ds/toast": "<rootDir>/packages/react/src/atomic/Toast/src",
"@nimbus-ds/toggle": "<rootDir>/packages/react/src/atomic/Toggle/src",
"@nimbus-ds/tooltip": "<rootDir>/packages/react/src/atomic/Tooltip/src",
// composites
"@nimbus-ds/accordion":
"<rootDir>/packages/react/src/composite/Accordion/src",
"@nimbus-ds/alert": "<rootDir>/packages/react/src/composite/Alert/src",
"@nimbus-ds/card": "<rootDir>/packages/react/src/composite/Card/src",
"@nimbus-ds/modal": "<rootDir>/packages/react/src/composite/Modal/src",
"@nimbus-ds/pagination":
"<rootDir>/packages/react/src/composite/Pagination/src",
"@nimbus-ds/sidebar": "<rootDir>/packages/react/src/composite/Sidebar/src",
"@nimbus-ds/tabs": "<rootDir>/packages/react/src/composite/Tabs/src",
"@nimbus-ds/table": "<rootDir>/packages/react/src/composite/Table/src",
"@nimbus-ds/collapsible":
"<rootDir>/packages/react/src/composite/Collapsible/src",
// commons
"^.+\\.svg$": "jest-svg-transformer",
},
transform: {
"^.+\\.css\\.ts$": "babel-jest",
".+\\.(ts|tsx)$": "ts-jest",
},
coveragePathIgnorePatterns: [
"dist",
".scripts",
"packages/helper",
"packages/core/typings",
],
};
export default config;