-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.js
More file actions
25 lines (24 loc) · 903 Bytes
/
Copy pathjest.config.js
File metadata and controls
25 lines (24 loc) · 903 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
module.exports = {
preset: '@waldronmatt/jest-config',
testMatch: [
// other common folder naming conventions
// __mocks__ , __fixtures__ , __snapshots__
'<rootDir>/__tests__/**/**.+(ts|tsx|js|jsx)',
'<rootDir>/src/**/?(*.)+(spec|test).+(ts|tsx|js|jsx)',
],
moduleNameMapper: {
/*
method for stubbing Webpack resource queries
https://github.com/visualfanatic/vue-svg-loader/issues/73#issuecomment-478295746
should match any file extension containing any '?' resource
queries with '@' webpack alias
*/
'^@/(.*.)(\\?(.*))$': '<rootDir>/src/$1',
// resolve '@' Webpack alias
// https://stackoverflow.com/a/65578141
'^@/(.*)$': '<rootDir>/src/$1',
},
// ignore transformations and coverages against node_modules
transformIgnorePatterns: ['<rootDir>/node_modules/'],
coveragePathIgnorePatterns: ['<rootDir>/node_modules/'],
};