如何在Windows上使用JHipster v5.8.2运行客户端测试?

问题描述 投票:1回答:1

我在Windows操作系统上使用JHipster v5.8.2,我试图通过运行命令来运行Jest客户端测试:

npm test

但我得到一个错误,上面写着:

No tests found, exiting with code 1
Run with `--passWithNoTests` to exit with code 0
In C:\IdeaProjects\pomzen
  274 files checked.
  testMatch: 
C:/IdeaProjects/pomzen/src/test/javascript/spec/**\+(*.)+(spec.ts) - 0 
matches
  testPathIgnorePatterns: \\node_modules\\ - 274 matches
  testRegex:  - 0 matches
Pattern:  - 0 matches
npm ERR! Test failed.  See above for more details.
jhipster
1个回答
1
投票

我最近也有这个问题。我从这里使用了解决方法:https://github.com/DorianGrey/ng-webpack-template/pull/22/commits/fe95926607ed8bd01476c7d04b5b930a965ad282

固定:

  1. 打开is.conf.js文件
  2. 更换
testMatch: ['<rootDir>/src/test/javascript/spec/**/+(*.)+(spec.ts)']

testMatch: ['**/*.spec.ts']
© www.soinside.com 2019 - 2024. All rights reserved.