From 3e07ade5a64d5f423fced24362a030fcf3c4ec46 Mon Sep 17 00:00:00 2001 From: Jan Hellar Date: Fri, 29 Mar 2019 09:53:38 +0100 Subject: [PATCH] feat: Added test coverage --- .circleci/config.yml | 3 +++ .gitignore | 3 +++ package.json | 17 ++++++++++++++--- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 260b0498..46472f6e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -19,6 +19,9 @@ jobs: - run: name: test command: npm test + - run: + name: coverage + command: npm run coverage - run: name: Lint all TypeScript code command: npm run lint:ts diff --git a/.gitignore b/.gitignore index 0b1a5bcc..dcd6fae0 100644 --- a/.gitignore +++ b/.gitignore @@ -16,6 +16,9 @@ yarn-error.log* # Coverage (from Jest) coverage/ +# Coverage (from nyc) +.nyc_output + # JUnit Reports (used mainly in CircleCI) reports/ junit.xml diff --git a/package.json b/package.json index f5ed74be..47d8f1a6 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,8 @@ "name": "@aerogear/voyager-server-monorepo", "private": true, "scripts": { - "test": "lerna exec -- npm test", + "test": "nyc lerna exec -- npm test", + "coverage": "nyc report --reporter=text-lcov | coveralls", "bootstrap": "lerna bootstrap --no-ci", "clean": "lerna clean --yes", "lint": "npm run lint:ts", @@ -27,12 +28,22 @@ "@types/node": "10.14.3", "@types/pino": "5.20.0", "ava": "1.4.0", + "coveralls": "^3.0.3", "graphql": "14.1.1", "lerna": "3.13.1", + "nyc": "^13.3.0", + "standard": "12.0.1", "ts-node": "8.0.3", "tslint": "5.14.0", - "typescript": "3.3.4000", "typedoc": "0.14.2", - "standard": "12.0.1" + "typescript": "3.3.4000" + }, + "nyc": { + "extension": [ + ".ts" + ], + "exclude": [ + "**/*.test.ts" + ] } }