-
-
Notifications
You must be signed in to change notification settings - Fork 65
/
jest.config.js
32 lines (31 loc) · 1009 Bytes
/
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
const pkg = require("./package.json");
module.exports = {
preset: "ts-jest",
globals: {
__DEV__: true,
__SSR__: true,
__VERSION__: pkg.version,
__VUE_2__: process.env.VUE === "2",
__COMMIT__: "none",
},
setupFiles: [
"<rootDir>/__tests__/setupTest.js",
"<rootDir>/packages/vue-composable/__tests__/setupTest.js",
"<rootDir>/packages/axios/__tests__/setupTest.js",
"<rootDir>/packages/cookie/__tests__/setupTest.js",
],
moduleNameMapper:
process.env.VUE === "2"
? {}
: {
"^vue$": "@vue/runtime-core",
},
coverageDirectory: "coverage",
coverageReporters: ["html", "lcov", "text"],
collectCoverageFrom: ["src/**/*.ts", "packages/*/src/**/*.ts"],
watchPathIgnorePatterns: ["/node_modules/"],
moduleFileExtensions: ["ts", "tsx", "js", "json"],
rootDir: __dirname,
testMatch: ["<rootDir>/packages/**/__tests__/**/*spec.[jt]s?(x)"],
// testMatch: ["<rootDir>/packages/vue-composable/__tests__/**/*spec.[jt]s?(x)"]
};