I have hundreds of tests in mocha, tens of which are being skipped.
I would like to run the suite, but only listing the skipped ones, so I can address them.
Does anyone know a way to achieve this? There does not seem to be a command line flag
Mocha comes with a built-in JSON reporter. The output JSON lists all the skipped test cases. For example
mocha -R JSON > test-report.json
Here the test-report.json file should have the following structure.
{
stats: {...},
tests: [...],
pending: [...],
failures: [...],
passes: [...]
}
The "pending" key should have all the skipped test cases.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With