From 2c61d236d77dfcb22b4560afe4c957ddf45b4337 Mon Sep 17 00:00:00 2001 From: Evan You Date: Sat, 3 Feb 2018 14:21:57 -0500 Subject: [PATCH] fix: fix jest test match fix #771 --- packages/@vue/cli-plugin-unit-jest/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/@vue/cli-plugin-unit-jest/index.js b/packages/@vue/cli-plugin-unit-jest/index.js index 7c00c798f..a413d7f89 100644 --- a/packages/@vue/cli-plugin-unit-jest/index.js +++ b/packages/@vue/cli-plugin-unit-jest/index.js @@ -18,8 +18,8 @@ module.exports = api => { const jestBinPath = require.resolve('jest/bin/jest') let testMatch = [] - if (!args._.length && api.hasPlugin('typescript')) { - testMatch = [`--testMatch`, `/test/unit/**/*.spec.(ts|tsx|js)`] + if (!args._.length) { + testMatch = [`--testMatch`, `/(test/unit/**/*.spec.(ts|tsx|js)|**/__tests__/*.(ts|tsx|js))`] } const argv = [