From 74d04f69354a03a51ac8b06cdb386f3730160344 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=98=89=E6=B6=B5?= Date: Tue, 15 Aug 2017 21:56:45 +0800 Subject: [PATCH] fix: test coverage --- test/unit/get-webpack-conf.js | 1 + test/unit/index.js | 6 ------ 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/test/unit/get-webpack-conf.js b/test/unit/get-webpack-conf.js index 550c50d8b..a1b201c4d 100644 --- a/test/unit/get-webpack-conf.js +++ b/test/unit/get-webpack-conf.js @@ -26,6 +26,7 @@ const webpackConfig = { } }) ], + stats: 'errors-only', resolve: { modules: [ path.resolve(process.cwd(), 'node_modules'), diff --git a/test/unit/index.js b/test/unit/index.js index 3a8c88393..fc003e86e 100644 --- a/test/unit/index.js +++ b/test/unit/index.js @@ -3,9 +3,3 @@ require('packages/vant-css/src/index.css'); // require all test files (files that ends with .spec.js) const testsReq = require.context('./specs', true, /\.spec$/); testsReq.keys().forEach(testsReq); - -// require all src files except main.js for coverage. -// you can also change this to match only the subset of files that -// you want coverage for. -const srcReq = require.context('../../src', true, /^\.\/(?!main(\.js)?$)/); -srcReq.keys().forEach(srcReq);