Commit 4cb55fcb authored by Evan Read's avatar Evan Read

Merge branch 'mvanremmerden-master-patch-42136' into 'master'

Add mocha to javascript examples

See merge request gitlab-org/gitlab!72963
parents 8117335f d8f7ddde
......@@ -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:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment