From 0e5d21a75bd0b85a05f482a2c8b5af1912a66cd6 Mon Sep 17 00:00:00 2001 From: Michal Dorner Date: Wed, 31 Mar 2021 23:59:56 +0200 Subject: [PATCH] Document potential issue with mocha JSON reporter --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 8920091..4647d47 100644 --- a/README.md +++ b/README.md @@ -286,6 +286,10 @@ You can use following example configuration in `package.json`: "test": "mocha --reporter json > test-results.json" } ``` + +Test processing might fail if any of your tests writes anything on standard output. +Mocha unfortunately doesn't have option to store `json` output directly to file and we have to rely on redirecting its standard output. +There is a work in progress to fix it: [mocha#4607](https://github.com/mochajs/mocha/pull/4607) ## GitHub limitations