Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'doc/ci/unit_test_reports.md')
-rw-r--r--doc/ci/unit_test_reports.md18
1 files changed, 18 insertions, 0 deletions
diff --git a/doc/ci/unit_test_reports.md b/doc/ci/unit_test_reports.md
index c37d7f27970..e758fbc91dd 100644
--- a/doc/ci/unit_test_reports.md
+++ b/doc/ci/unit_test_reports.md
@@ -290,6 +290,24 @@ javascript:
- junit.xml
```
+#### Mocha
+
+The [JUnit Reporter for Mocha](https://github.com/michaelleeallen/mocha-junit-reporter) NPM package can generate test reports for JavaScript
+applications.
+In the following `.gitlab-ci.yml` example, the `javascript` job uses Mocha to generate the test reports:
+
+```yaml
+javascript:
+ stage: test
+ script:
+ - mocha --reporter mocha-junit-reporter --reporter-options mochaFile=junit.xml
+ artifacts:
+ when: always
+ reports:
+ junit:
+ - junit.xml
+```
+
### Flutter / Dart example
This example `.gitlab-ci.yml` file uses the [JUnit Report](https://pub.dev/packages/junitreport) package to convert the `flutter test` output into JUnit report XML format: