forked from FarmBot/Farmbot-Web-App
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
53 lines (53 loc) · 1.27 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
module.exports = {
testEnvironment: "jsdom",
clearMocks: true,
logHeapUsage: true,
globals: {
globalConfig: {
NODE_ENV: "development",
TOS_URL: "https://farm.bot/tos/",
PRIV_URL: "https://farm.bot/privacy/",
LONG_REVISION: "------------",
SHORT_REVISION: "--------"
},
TextEncoder: require('util').TextEncoder,
TextDecoder: require('util').TextDecoder,
},
setupFiles: [
"./frontend/__test_support__/setup_enzyme.ts",
"./frontend/__test_support__/localstorage.js",
"./frontend/__test_support__/mock_fbtoaster.ts",
"./frontend/__test_support__/mock_i18next.ts",
"./frontend/__test_support__/additional_mocks.tsx",
"jest-canvas-mock",
],
transform: {
".(ts|tsx)": "ts-jest"
},
testRegex: "(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$",
moduleFileExtensions: [
"ts",
"tsx",
"js"
],
moduleNameMapper: {
"^axios": require.resolve("axios"),
},
collectCoverage: true,
collectCoverageFrom: [
"frontend/**/*.{ts,tsx}"
],
reporters: [
"default",
"jest-skipped-reporter"
],
coverageReporters: [
"html",
"json",
"lcov"
],
coverageDirectory: "<rootDir>/coverage_fe",
setupFilesAfterEnv: [
"<rootDir>/frontend/__test_support__/customMatchers.js"
]
}