From c92ced37371be09e1d028e81cd0c86365e5607ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20M=C3=BCller?= Date: Tue, 6 Aug 2024 16:39:58 +0200 Subject: [PATCH] Change docs for mocha-json mochajs/mocha#4607 has been merged --- README.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/README.md b/README.md index e98cc2d5..855867ff 100644 --- a/README.md +++ b/README.md @@ -310,13 +310,9 @@ Configuration of `uniqueOutputName`, `suiteNameTemplate`, `classNameTemplate`, ` You can use the following example configuration in `package.json`: ```json "scripts": { - "test": "mocha --reporter json > test-results.json" + "test": "mocha --reporter json --reporter-option output=test-results.json" } ``` - -Test processing might fail if any of your tests write anything on standard output. -Mocha, unfortunately, doesn't have the option to store `json` output directly to the 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)