diff --git a/Makefile b/Makefile index 9cf77e597e..961d99f66b 100644 --- a/Makefile +++ b/Makefile @@ -515,7 +515,7 @@ ui-zuul-lint-and-test: $(NPM_BIN) --prefix awx/ui_next install $(NPM_BIN) run --prefix awx/ui_next lint $(NPM_BIN) run --prefix awx/ui_next prettier-check - $(NPM_BIN) run --prefix awx/ui_next test + $(NPM_BIN) run --prefix awx/ui_next test -- --coverage --watchAll=false # Build a pip-installable package into dist/ with a timestamped version number. diff --git a/awx/ui_next/README.md b/awx/ui_next/README.md index 2755f136d9..3c19b06dd2 100644 --- a/awx/ui_next/README.md +++ b/awx/ui_next/README.md @@ -53,6 +53,9 @@ npm --prefix awx/ui_next test -- src/screens/Login/Login.test.jsx # start the test watcher and run tests on files that you've changed npm --prefix awx/ui_next run test-watch + +# start the tests and get the coverage report after the tests have completed +npm --prefix awx/ui_next run test -- --coverage ``` #### Note: - Once the test watcher is up and running you can hit `a` to run all the tests. diff --git a/awx/ui_next/package.json b/awx/ui_next/package.json index 2e791418db..0d470a17ca 100644 --- a/awx/ui_next/package.json +++ b/awx/ui_next/package.json @@ -58,7 +58,7 @@ "start": "PORT=3001 HTTPS=true DANGEROUSLY_DISABLE_HOST_CHECK=true react-scripts start", "start-instrumented": "DEBUG=instrument-cra PORT=3001 HTTPS=true DANGEROUSLY_DISABLE_HOST_CHECK=true react-scripts -r @cypress/instrument-cra start", "build": "INLINE_RUNTIME_CHUNK=false react-scripts build", - "test": "TZ='UTC' react-scripts test --coverage --watchAll=false", + "test": "TZ='UTC' react-scripts test --watchAll=false", "test-watch": "TZ='UTC' react-scripts test", "eject": "react-scripts eject", "lint": "eslint --ext .js --ext .jsx .",