forked from dulimarta/spherical-easel
/
jest.config.js
36 lines (35 loc) · 1.26 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
module.exports = {
preset: "@vue/cli-plugin-unit-jest/presets/typescript-and-babel",
moduleNameMapper: {
/* Because all files under the node_modules directory are not transpiled
by Jest, we must provide a stub implementation of JS files imported from node_modules/examples/jsm/controls */
// "three/examples/jsm/controls/(.*)$": "<rootDir>/tests/stub-modules/$1"
"~/(.*)$": "<rootDir>/src/$1",
// Skip parsing CSS files
"\\.(css|less)$": "<rootDir>/src/assets/css/__mocks__/styleMock.js"
},
moduleFileExtensions: ["js", "ts", "vue"],
// transform: {
// "^.+\\.vue$": "vue-jest",
// "^.+\\.ts$": "ts-jest"
// },
testPathIgnorePatterns: [
"tests/unit/.+\\.spec\\.ts",
".+\\.cyp\\.ts",
".+\\.spek\\.ts",
"sphereframe-helper.ts"
],
// modulePathIgnorePatterns: ["tests/unit/*.spec.ts"],
verbose: true,
// roots: ["<rootDir>/src", "<rootDir>/tests"],
setupFilesAfterEnv: ["<rootDir>/tests/setup.ts"],
snapshotSerializers: ["<rootDir>/node_modules/jest-serializer-vue"],
collectCoverage: false,
collectCoverageFrom: [
"<rootDir>/src/**/*.ts",
"<rootDir>/src/components/*.vue",
"!<rootDir>/src/global-settings.ts",
"!<rootDir>/src/i18n.ts"
]
// coverageReporters: ["json", "lcov", "text", "clover"]
};