I'm trying to run my react app's tests in Azure Dev Ops I can't figure out how to make the execution stop after the tests run. It just hangs there, holding the pipeline in running mode forever. It's a simple create-react-app application which has a couple of tests. Below is my pipeline's 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'
I had just "- script: npm test" on the test step but, following instructions in the facebook github I created a new test script (called citest): set CI=true && react-scripts test a but it still does not work. I get the below output in the dev ops console and the task just keeps running forever:
> 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.
I've run out of ideas on what to try - any help is appreciated!