From 30c2da411c6e59f8beb2346d2c20887534a36ecc Mon Sep 17 00:00:00 2001 From: Ferdi Koomen Date: Sun, 12 Jan 2020 00:02:12 +0100 Subject: [PATCH] - Added code coverage --- .circleci/config.yml | 2 +- .travis.yml | 2 +- jest.config.js | 9 ++++++++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9b810fdd..b3de9a13 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -22,4 +22,4 @@ jobs: command: yarn build - run: name: test - command: yarn test + command: yarn test:coverage diff --git a/.travis.yml b/.travis.yml index c11c1276..cff0ddd3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,4 +3,4 @@ node_js: - node script: - npm run build - - npm run test + - npm run test:coverage diff --git a/jest.config.js b/jest.config.js index 2e06763f..813f9455 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,4 +1,11 @@ module.exports = { testRegex: '\\.spec\\.(ts|js)$', - testEnvironment: 'node' + testEnvironment: 'node', + collectCoverage: true, + collectCoverageFrom: [ + 'src/**/*.ts', + '!src/**/*.d.ts', + '!src/templates/**', + '!**/node_modules/**', + ] };