-
Notifications
You must be signed in to change notification settings - Fork 50
Expand file tree
/
Copy pathjest.config.js
More file actions
42 lines (36 loc) · 953 Bytes
/
jest.config.js
File metadata and controls
42 lines (36 loc) · 953 Bytes
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
42
module.exports = {
moduleFileExtensions: [
'js',
'jsx',
'json',
'vue',
],
transform: {
'^.+\\.vue$': 'vue-jest',
'.+\\.(css|styl|less|sass|scss|png|jpg|ttf|woff|woff2)$': 'jest-transform-stub',
'^.+\\.jsx?$': 'babel-jest',
'\\.svg$': '<rootDir>/fileTransformer.js',
'\\.yml$': '<rootDir>/fileTransformer.js',
},
transformIgnorePatterns: [
'/node_modules/((?!@fortawesome).)*/',
],
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1',
'^js-yaml-loader\\!@fortawesome/(.*)\\.yml$': '<rootDir>/node_modules/@fortawesome/$1.yml',
},
snapshotSerializers: [
'jest-serializer-vue',
],
testMatch: [
'**/tests/unit/**/*.spec.(js|jsx|ts|tsx)',
],
watchPlugins: [
'jest-watch-typeahead/filename',
'jest-watch-typeahead/testname',
],
collectCoverage: false,
coverageDirectory: 'jest-coverage',
testEnvironment: 'jsdom',
preset: '@vue/cli-plugin-unit-jest',
};