Document mocha-json usage

This commit is contained in:
Michal Dorner 2021-03-08 21:27:44 +01:00
parent 9db99178aa
commit b9af250554
No known key found for this signature in database
GPG key ID: 9EEE04B48DA36786
2 changed files with 17 additions and 2 deletions

View file

@ -16,8 +16,8 @@ This [Github Action](https://github.com/features/actions) displays test results
- .NET / [xUnit](https://xunit.net/) / [NUnit](https://nunit.org/) / [MSTest](https://github.com/Microsoft/testfx-docs)
- Dart / [test](https://pub.dev/packages/test)
- Flutter / [test](https://pub.dev/packages/test)
- JavaScript / [JEST](https://jestjs.io/)
- Java / [JUnit](https://junit.org/)
- JavaScript / [JEST](https://jestjs.io/) / [Mocha](https://mochajs.org/)
For more information see [Supported formats](#supported-formats) section.
@ -273,6 +273,21 @@ You can use following example configuration in `package.json`:
Configuration of `uniqueOutputName`, `suiteNameTemplate`, `classNameTemplate`, `titleTemplate` is important for proper visualization of test results.
</details>
<details>
<summary>mocha-json</summary>
[Mocha](https://mochajs.org/) testing framework support requires:
- Mocha version [v7.2.0](https://github.com/mochajs/mocha/releases/tag/v7.2.0) or higher
- Usage of [json](https://mochajs.org/#json) reporter.
You can use following example configuration in `package.json`:
```json
"scripts": {
"test": "mocha --reporter json > test-results.json"
}
```
</details>
## GitHub limitations
Unfortunately there are some known issues and limitations caused by GitHub API:

View file

@ -1,6 +1,6 @@
name: Test Reporter
description: |
Displays test results directly in GitHub. Supports .NET (xUnit, NUnit, MSTest), Dart, Flutter and JavaScript (JEST).
Shows test results in GitHub UI: .NET (xUnit, NUnit, MSTest), Dart, Flutter, Java (JUnit), JavaScript (JEST, Mocha)
author: Michal Dorner <dorner.michal@gmail.com>
inputs:
artifact: