我正在尝试在 Azure Dev Ops 中运行我的 React 应用程序测试我不知道如何在测试运行后停止执行。它只是挂在那里,将管道永远保持在运行模式。这是一个简单的 create-react-app 应用程序,它有几个测试。下面是我的管道的 YAML:
trigger: none
pool:
vmImage: 'ubuntu-latest'
steps:
- task: NodeTool@0
inputs:
versionSpec: '10.x'
displayName: 'Install Node.js'
- script: |
npm install
npm run build
displayName: 'npm install and build'
- script: npm run citest
- task: PublishPipelineArtifact@0
inputs:
artifactName: 'react'
targetPath: './build'
我刚刚在测试步骤中使用了“- script: npm test”,但是,按照facebook github 中的说明,我创建了一个新的测试脚本(称为 citest):set CI=true && react-scripts test a
但它仍然不起作用。我在 dev ops 控制台中得到以下输出,并且任务一直在运行:
> set CI=true && react-scripts test a
PASS src/components/landing/landing.test.js (6.008s)
PASS src/components/navbar/NavBar.test.js
PASS src/components/app/App.test.js
Test Suites: 3 passed, 3 total
Tests: 3 passed, 3 total
Snapshots: 0 total
Time: 7.573s
Ran all test suites matching /a/i.
我已经没有什么可以尝试的想法了 - 感谢任何帮助!