Adding test coverage

This commit is contained in:
Jeff Avallone 2018-02-11 13:10:24 -05:00
parent 152bf1e361
commit ca41d2015a
2 changed files with 11 additions and 2 deletions

3
.gitignore vendored
View File

@ -20,3 +20,6 @@ node_modules/
# Build output # Build output
build/ build/
# Coverage reports
coverage/

View File

@ -14,7 +14,7 @@
"start:prod": "run-s build start:http-server", "start:prod": "run-s build start:http-server",
"start:http-server": "http-server ./build", "start:http-server": "http-server ./build",
"build": "webpack --config webpack.prod.js", "build": "webpack --config webpack.prod.js",
"test": "run-s test:lint test:unit", "test": "run-s test:lint 'test:unit --coverage'",
"test:unit": "jest", "test:unit": "jest",
"test:lint": "eslint --ignore-path .gitignore .", "test:lint": "eslint --ignore-path .gitignore .",
"test:watch": "yarn test:unit --watch", "test:watch": "yarn test:unit --watch",
@ -28,7 +28,13 @@
"moduleNameMapper": { "moduleNameMapper": {
"\\.svg$": "<rootDir>/src/__mocks__/svgMock.js", "\\.svg$": "<rootDir>/src/__mocks__/svgMock.js",
"\\.css$": "<rootDir>/src/__mocks__/styleMock.js" "\\.css$": "<rootDir>/src/__mocks__/styleMock.js"
} },
"collectCoverageFrom": [
"src/**/*.js",
"!src/pages/**"
],
"coverageDirectory": "<rootDir>/coverage",
"coverageReporters": ["text-summary", "html"]
}, },
"dependencies": { "dependencies": {
"autoprefixer": "^7.2.5", "autoprefixer": "^7.2.5",