forked from shopware/meteor-component-library
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
35 lines (35 loc) · 960 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
33
34
35
/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
module.exports = {
preset: 'ts-jest/presets/js-with-ts',
testEnvironment: 'jsdom',
moduleFileExtensions: [
"js",
"ts",
"json",
// tell Jest to handle `*.vue` files
"vue"
],
transform: {
// process `*.vue` files with `vue-jest`
".*\\.(vue)$": "@vue/vue2-jest",
'.*\\.js$':'ts-jest',
// stringify svg imports
".*\\.(svg)$": "<rootDir>/utils/svgStringifyTransformer.js",
},
transformIgnorePatterns: [
"node_modules/(?!lodash|@shopware-ag/meteor-icon-kit|other)"
],
globals: {
'ts-jest': {
isolatedModules: true
}
},
moduleNameMapper: {
'\\.(css)$': '<rootDir>/utils/styleMock.js',
},
setupFiles: ["<rootDir>/jest.setup.js"],
roots: ['src'],
testMatch: ['<rootDir>/src/**/*.spec.js', '<rootDir>/src/**/*.spec.ts'],
collectCoverage: false,
collectCoverageFrom: ["**/*.{js,vue}", "!**/node_modules/**"]
};