From 80da964dc36e9fc9ef1d85d3cdf4d90ca725a07b Mon Sep 17 00:00:00 2001 From: mehmet-erim Date: Thu, 10 Oct 2019 11:55:22 +0300 Subject: [PATCH] feat: configure coverage --- npm/ng-packs/jest.config.js | 1 + npm/ng-packs/packages/core/jest.config.js | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/npm/ng-packs/jest.config.js b/npm/ng-packs/jest.config.js index d9294d5935..580ba0bcdf 100644 --- a/npm/ng-packs/jest.config.js +++ b/npm/ng-packs/jest.config.js @@ -8,6 +8,7 @@ module.exports = { '^.+\\.(ts|js|html)$': 'ts-jest', }, moduleFileExtensions: ['ts', 'js', 'html'], + coverageDirectory: '/coverage', coverageReporters: ['html'], preset: 'jest-preset-angular', setupFilesAfterEnv: ['/test-setup.ts'], diff --git a/npm/ng-packs/packages/core/jest.config.js b/npm/ng-packs/packages/core/jest.config.js index c46ff0a2da..67c57c7a42 100644 --- a/npm/ng-packs/packages/core/jest.config.js +++ b/npm/ng-packs/packages/core/jest.config.js @@ -1,9 +1,10 @@ const { pathsToModuleNameMapper } = require('ts-jest/utils'); const { compilerOptions } = require('./tsconfig.spec'); +const jestConfig = require('../../jest.config'); module.exports = { + ...jestConfig, name: 'core', testMatch: ['/packages/core/**/+(*.)+(spec|test).+(ts|js)?(x)'], - coverageDirectory: '../../coverage/libs/core', moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths /*, { prefix: '/' } */), };