After we've installed Jest, we need to configure it:
- Add the tests scripts and the Jest configuration into our package.json:
{ "name": "react-pro", "version": "1.0.0", "scripts": { "clean": "rm -rf dist/ && rm -rf public/app", "start": "npm run clean & NODE_ENV=development BABEL_ENV=development nodemon src/server --watch src/server -- watch src/shared --exec babel-node --presets es2015", "start-analyzer": "npm run clean && NODE_ENV=development BABEL_ENV=development ANALYZER=true babel-node src/server", "test": "node scripts/test.js src --env=jsdom", "coverage": "node scripts/test.js src --coverage --env=jsdom" }, "jest": { "setupTestFrameworkScriptFile": " <rootDir>/config/jest/setupTestFramework.js", "collectCoverageFrom ...