Skip to content

Instantly share code, notes, and snippets.

@ramon-src
Last active January 27, 2018 11:28
Show Gist options
  • Save ramon-src/276e0fab37010bb00291543fe86647c1 to your computer and use it in GitHub Desktop.
Save ramon-src/276e0fab37010bb00291543fe86647c1 to your computer and use it in GitHub Desktop.
The main configurations to run npm test with jest
{
"_comment": "Many Project INFO goes here...",
"scripts": {
"_comment": "Many scripts goes here...",
"test": "jest"
},
"dependencies": {
"_comment": "Many dependencies goes here...",
},
"devDependencies": {
"_comment": "Many dependencies goes here...",
},
"jest": {
"moduleFileExtensions": [
"js",
"json",
"vue"
],
"transform": {
".*\\.(vue)$": "<rootDir>/node_modules/vue-jest",
"^.+\\.js$": "<rootDir>/node_modules/babel-jest"
},
"moduleNameMapper": {
"^@/(.*)$": "<rootDir>/src/$1"
},
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment