mirror of
https://github.com/dorny/test-reporter.git
synced 2026-02-02 03:15:22 -08:00
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d61b558e8d | ||
|
|
fd386493ac | ||
|
|
3847ac0f98 | ||
|
|
f067224a7b | ||
|
|
c92ced3737 | ||
|
|
9098107e2a | ||
|
|
e1a31eb7a0 | ||
|
|
a923ed8851 | ||
|
|
1e3a380fe6 |
16
README.md
16
README.md
@@ -307,16 +307,22 @@ Configuration of `uniqueOutputName`, `suiteNameTemplate`, `classNameTemplate`, `
|
|||||||
- Mocha version [v7.2.0](https://github.com/mochajs/mocha/releases/tag/v7.2.0) or higher
|
- Mocha version [v7.2.0](https://github.com/mochajs/mocha/releases/tag/v7.2.0) or higher
|
||||||
- Usage of [json](https://mochajs.org/#json) reporter.
|
- Usage of [json](https://mochajs.org/#json) reporter.
|
||||||
|
|
||||||
You can use the following example configuration in `package.json`:
|
For Mocha >= [v9.1.0](https://github.com/mochajs/mocha/releases/tag/v9.1.0), you can use the following example configuration in `package.json`:
|
||||||
|
```json
|
||||||
|
"scripts": {
|
||||||
|
"test": "mocha --reporter json --reporter-option output=test-results.json"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
For Mocha < v9.1, the command should look like this:
|
||||||
```json
|
```json
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "mocha --reporter json > test-results.json"
|
"test": "mocha --reporter json > test-results.json"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
Additionally, test processing might fail if any of your tests write anything on standard output.
|
||||||
Test processing might fail if any of your tests write anything on standard output.
|
Before version [v9.1.0](https://github.com/mochajs/mocha/releases/tag/v9.1.0), Mocha doesn't have the option to store `json` output directly to the file, and we have to rely on redirecting its standard output ([mocha#4607](https://github.com/mochajs/mocha/pull/4607)).
|
||||||
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.
|
Please update Mocha to version [v9.1.0](https://github.com/mochajs/mocha/releases/tag/v9.1.0) or above if you encounter this issue.
|
||||||
There is a work in progress to fix it: [mocha#4607](https://github.com/mochajs/mocha/pull/4607)
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
|||||||
7
package-lock.json
generated
7
package-lock.json
generated
@@ -23,7 +23,6 @@
|
|||||||
"@octokit/webhooks": "^12.0.11",
|
"@octokit/webhooks": "^12.0.11",
|
||||||
"@octokit/webhooks-types": "^7.3.1",
|
"@octokit/webhooks-types": "^7.3.1",
|
||||||
"@types/adm-zip": "^0.5.5",
|
"@types/adm-zip": "^0.5.5",
|
||||||
"@types/github-slugger": "^1.3.0",
|
|
||||||
"@types/jest": "^29.5.12",
|
"@types/jest": "^29.5.12",
|
||||||
"@types/node": "^18.19.32",
|
"@types/node": "^18.19.32",
|
||||||
"@types/picomatch": "^2.3.3",
|
"@types/picomatch": "^2.3.3",
|
||||||
@@ -1614,12 +1613,6 @@
|
|||||||
"@types/responselike": "^1.0.0"
|
"@types/responselike": "^1.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@types/github-slugger": {
|
|
||||||
"version": "1.3.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@types/github-slugger/-/github-slugger-1.3.0.tgz",
|
|
||||||
"integrity": "sha512-J/rMZa7RqiH/rT29TEVZO4nBoDP9XJOjnbbIofg7GQKs4JIduEO3WLpte+6WeUz/TcrXKlY+bM7FYrp8yFB+3g==",
|
|
||||||
"dev": true
|
|
||||||
},
|
|
||||||
"node_modules/@types/graceful-fs": {
|
"node_modules/@types/graceful-fs": {
|
||||||
"version": "4.1.9",
|
"version": "4.1.9",
|
||||||
"resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz",
|
"resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz",
|
||||||
|
|||||||
@@ -46,7 +46,6 @@
|
|||||||
"@octokit/webhooks": "^12.0.11",
|
"@octokit/webhooks": "^12.0.11",
|
||||||
"@octokit/webhooks-types": "^7.3.1",
|
"@octokit/webhooks-types": "^7.3.1",
|
||||||
"@types/adm-zip": "^0.5.5",
|
"@types/adm-zip": "^0.5.5",
|
||||||
"@types/github-slugger": "^1.3.0",
|
|
||||||
"@types/jest": "^29.5.12",
|
"@types/jest": "^29.5.12",
|
||||||
"@types/node": "^18.19.32",
|
"@types/node": "^18.19.32",
|
||||||
"@types/picomatch": "^2.3.3",
|
"@types/picomatch": "^2.3.3",
|
||||||
|
|||||||
Reference in New Issue
Block a user