Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/hibernate/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在Windows上使用JHipster v5.8.2运行客户端测试?_Jhipster - Fatal编程技术网

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

如何在Windows上使用JHipster v5.8.2运行客户端测试?,jhipster,Jhipster,我在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/s

我在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.

我最近也有这个问题。我在这里使用了变通方法:

修正:

  • 打开jest.conf.js文件
  • 替换
  • testMatch:['/src/test/javascript/spec/***/+(*)+(spec.ts)]
    

    testMatch:['**.spec.ts']
    
    听起来像个bug。你能把它输入JHipster的bug跟踪器中,并附上复制的步骤吗?我在5.8.2中为docker'./mvnw package-Pprod verify jib:dockerBuild'打包网关时遇到此错误,但在运行默认生成时没有遇到此错误。/mvnw,Jakub的解决方法可防止失败。