Mocha
A guide for generating JUnit test reports for Mocha tests
1. Generate JUnit
Install the mocha-junit-reporter
package:
Configure your Mocha runner to use the JUnit reporter:
2. Output Location
The resulting JUnit XML file will be written to the location specified by the mochaFile
property in reporterOptions
. In the example above, the results would be at ./test_results/junit.xml
.
Next Step
JUnit files generated with Mocha are compatible with Trunk Flaky Tests. See CI Providers for a guide on how to upload test results to Trunk.
Last updated