-
Notifications
You must be signed in to change notification settings - Fork 7
/
jest.config.js
41 lines (37 loc) · 1.19 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
const { pathsToModuleNameMapper } = require("ts-jest/utils");
const { compilerOptions } = require("./tsconfig.json");
const mappedFromTsc = pathsToModuleNameMapper(compilerOptions.paths, { prefix: "<rootDir>/" });
const mappedAdditional = {
"^vue$": "vue",
};
const moduleNameMapper = { ...mappedFromTsc, ...mappedAdditional };
module.exports = {
preset: "ts-jest",
globals: {
__ENV__: "test",
TNS_ENV: "test",
"ts-jest": {
diagnostics: true,
tsconfig: "tsconfig.json",
},
FK_VERSION: "tests",
FK_BUILD_TIMESTAMP: "",
FK_BUILD_NUMBER: "",
FK_BUILD_TAG: "",
FK_BUILD_JOB: "",
FK_GIT_COMMIT: "",
FK_GIT_BRANCH: "",
},
transform: {
"^.+\\.ts$": "ts-jest",
"^.+\\.js$": "babel-jest",
"^.+\\.vue$": "vue-jest",
},
moduleNameMapper: moduleNameMapper,
transformIgnorePatterns: [],
setupFiles: ["./app/tests/setup.ts"],
testRegex: "(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$",
testPathIgnorePatterns: ["/lib/", "/node_modules/"],
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"],
collectCoverage: false,
};