-
Notifications
You must be signed in to change notification settings - Fork 1
/
jest.config.ts
30 lines (28 loc) · 1.19 KB
/
jest.config.ts
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
import type { Config } from '@jest/types'
const config: Config.InitialOptions = {
collectCoverageFrom: [
'**/*.{js,ts,vue}',
'!**/(node_modules|build|dist|dist-test|.cache|coverage|docs|tests_output)/**',
],
modulePathIgnorePatterns: ['<rootDir>/mpapi/', '<rootDir>/e2e/'],
moduleFileExtensions: ['js', 'ts', 'json', 'vue'],
moduleNameMapper: {
'vuetify/lib': '<rootDir>/node_modules/vuetify/es5',
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$':
'<rootDir>/__mocks__/fileMock.js',
'\\.(css|sass)$': '<rootDir>/__mocks__/styleMock.js',
},
testEnvironment: 'jsdom',
transform: {
'^[^.]+.vue$': '@vue/vue2-jest',
'^.+\\.tsx?$': 'ts-jest',
'^.*\\.js$': 'babel-jest',
},
// jest-canvas-mock and setup file is required because of @masterportal/masterportalapi; setup file is based on setup file from @masterportal/masterportalapi setup
setupFiles: ['jest-canvas-mock'],
setupFilesAfterEnv: ['./__mocks__/jest.setup.js'],
transformIgnorePatterns: [
'/node_modules/(?!(@repositoryname/vuex-generators|@masterportal/masterportalapi|ol|geotiff|quick-lru|color-(space|parse|rgba|name))/)',
],
}
export default config