From 4285d48691d359deeed4611a858448637480a82b Mon Sep 17 00:00:00 2001 From: Clark Du Date: Sun, 8 Apr 2018 22:41:12 +0800 Subject: [PATCH] refactor: use collectCoverageFrom instead of coveragePathIgnorePatterns --- jest.config.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/jest.config.js b/jest.config.js index 96793eea1a..c63187a530 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,11 +1,9 @@ module.exports = { testEnvironment: 'node', coverageDirectory: './coverage/', - coveragePathIgnorePatterns: [ - '/node_modules/', - '/test/', - '/lib/builder/webpack/plugins/vue/', - '/lib/[^/]*\\.js' + collectCoverageFrom: [ + 'lib/!(app)/**', + '!lib/builder/webpack/plugins/vue/**' ], setupTestFrameworkScriptFile: './test/utils/setup', testPathIgnorePatterns: ['test/fixtures/.*/.*?/'],