Jest Options
package.json
{
"name": "jest_testing",
"version": "1.0.0",
"description": "For Unit Testing Course",
"main": "index.js",
"scripts": {
"test": "jest --watchAll"
},
"author": "Elzero",
"license": "ISC",
"devDependencies": {
"jest": "^26.0.1"
},
"jest": {
"//1": "Collect Coverage Option",
"collectCoverage": true,
"coverageReporters": [
"html"
],
"//2": "Coverage Directory",
"coverageDirectory": "reports",
"collectCoverageFrom": [
"**/*.{js,jsx,ts}"
],
"coveragePathIgnorePatterns": [
"/node_modules/",
"/build/"
]
}
}