Skip to content

Commit

Permalink
Change docs for mocha-json
Browse files Browse the repository at this point in the history
mochajs/mocha#4607 has been merged
  • Loading branch information
chdanielmueller authored Aug 6, 2024
1 parent 9098107 commit c92ced3
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
</details>

<details>
Expand Down

0 comments on commit c92ced3

Please sign in to comment.