From ca41d2015ae3f22986d55687c8203dd1a1bc2f62 Mon Sep 17 00:00:00 2001 From: Jeff Avallone Date: Sun, 11 Feb 2018 13:10:24 -0500 Subject: [PATCH] Adding test coverage --- .gitignore | 3 +++ package.json | 10 ++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 82b528b..131321b 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,6 @@ node_modules/ # Build output build/ + +# Coverage reports +coverage/ diff --git a/package.json b/package.json index 4c65263..f994916 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "start:prod": "run-s build start:http-server", "start:http-server": "http-server ./build", "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:lint": "eslint --ignore-path .gitignore .", "test:watch": "yarn test:unit --watch", @@ -28,7 +28,13 @@ "moduleNameMapper": { "\\.svg$": "/src/__mocks__/svgMock.js", "\\.css$": "/src/__mocks__/styleMock.js" - } + }, + "collectCoverageFrom": [ + "src/**/*.js", + "!src/pages/**" + ], + "coverageDirectory": "/coverage", + "coverageReporters": ["text-summary", "html"] }, "dependencies": { "autoprefixer": "^7.2.5",