summaryrefslogtreecommitdiff
path: root/doc/ci/testing/unit_test_report_examples.md
diff options
context:
space:
mode:
Diffstat (limited to 'doc/ci/testing/unit_test_report_examples.md')
-rw-r--r--doc/ci/testing/unit_test_report_examples.md9
1 files changed, 8 insertions, 1 deletions
diff --git a/doc/ci/testing/unit_test_report_examples.md b/doc/ci/testing/unit_test_report_examples.md
index b49ac29be65..c14e4eedd7c 100644
--- a/doc/ci/testing/unit_test_report_examples.md
+++ b/doc/ci/testing/unit_test_report_examples.md
@@ -1,7 +1,7 @@
---
stage: Verify
group: Pipeline Insights
-info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
+info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments
---
# Unit test report examples **(FREE)**
@@ -183,7 +183,11 @@ the `javascript` job uses Jest to generate the test reports:
```yaml
javascript:
+ image: node:latest
stage: test
+ before_script:
+ - 'yarn global add jest'
+ - 'yarn add --dev jest-junit'
script:
- 'jest --ci --reporters=default --reporters=jest-junit'
artifacts:
@@ -193,6 +197,9 @@ javascript:
- junit.xml
```
+To make the job pass when there are no `.test.js` files with unit tests, add the
+`--passWithNoTests` flag to the end of the `jest` command in the `script:` section.
+
### Karma
The [Karma-junit-reporter](https://github.com/karma-runner/karma-junit-reporter)