Created
February 15, 2022 16:45
-
-
Save davidtorroija/4e2fd90cf7f2d315847bedd5cc821592 to your computer and use it in GitHub Desktop.
jest config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
moduleFileExtensions: [ | |
"js", | |
"json", | |
// tell Jest to handle `*.vue` files | |
"vue", | |
], | |
transform: { | |
// process `*.vue` files with `vue-jest` | |
"^.+\\.vue$": "vue-jest", | |
"^.+\\.js$": "babel-jest", | |
}, | |
moduleNameMapper: { | |
"^src(.*)$": "<rootDir>/src$1", | |
"^~src(.*)$": "<rootDir>/src$1", | |
"^<src>(.*)$": "<rootDir>/src$1", | |
"^lodash-es$": "lodash", | |
}, | |
collectCoverage: true, | |
collectCoverageFrom: [ | |
"**/src/**/*.{js,vue}", | |
"!**/dist/**/*.{js,vue}", | |
"!**/build/**/*.{js,vue}", | |
"!**/src/app/**/*.{js,vue}", | |
"!**/node_modules/**", | |
"!**/src/videojs-utils/**", | |
"!**/src/config/**", | |
], | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment