json-reporter
Advanced tools
Comparing version 3.0.0 to 3.1.0
@@ -5,2 +5,12 @@ # Change Log | ||
<a name="3.1.0"></a> | ||
# [3.1.0](https://github.com/gemini-testing/json-reporter/compare/v3.0.0...v3.1.0) (2024-04-22) | ||
### Features | ||
* add testplane support ([be22678](https://github.com/gemini-testing/json-reporter/commit/be22678)) | ||
<a name="2.1.1"></a> | ||
@@ -7,0 +17,0 @@ ## [2.1.1](https://github.com/gemini-testing/json-reporter/compare/v2.1.0...v2.1.1) (2020-02-21) |
'use strict'; | ||
const Collector = require('./lib/collector'); | ||
const hermioneToolCollector = require('./lib/collector/tool/hermione'); | ||
const parseConfig = require('./lib/config'); | ||
module.exports = (hermione, opts) => { | ||
const config = parseConfig(opts); | ||
if (!config.enabled) { | ||
return; | ||
} | ||
const collector = Collector.create(hermioneToolCollector, config); | ||
hermione.on(hermione.events.TEST_PASS, (data) => collector.addSuccess(data)); | ||
hermione.on(hermione.events.TEST_FAIL, (data) => collector.addFail(data)); | ||
hermione.on(hermione.events.TEST_PENDING, (data) => collector.addSkipped(data)); | ||
hermione.on(hermione.events.RETRY, (data) => collector.addRetry(data)); | ||
hermione.on(hermione.events.ERROR, (err, data) => data && collector.addError(data)); | ||
hermione.on(hermione.events.RUNNER_END, () => collector.saveFile()); | ||
}; | ||
module.exports = require('./plugin'); |
{ | ||
"name": "json-reporter", | ||
"version": "3.0.0", | ||
"description": "Common plugin for gemini and hermione which is intended to aggregate the results of tests running", | ||
"main": "hermione.js", | ||
"version": "3.1.0", | ||
"description": "Common plugin for testplane and hermione which is intended to aggregate the results of tests running", | ||
"main": "plugin.js", | ||
"scripts": { | ||
@@ -25,2 +25,3 @@ "lint": "eslint .", | ||
"keywords": [ | ||
"testplane", | ||
"hermione", | ||
@@ -27,0 +28,0 @@ "plugin", |
@@ -8,7 +8,8 @@ # json-reporter | ||
* [hermione](https://github.com/gemini-testing/hermione) | ||
* [testplane](https://github.com/gemini-testing/testplane) | ||
* [hermione](https://github.com/gemini-testing/testplane/tree/hermione) | ||
which is intended to aggregate the results of tests running. | ||
You can read more about hermione plugins [here](https://github.com/gemini-testing/hermione#plugins). | ||
You can read more about testplane plugins [here](https://github.com/gemini-testing/testplane/blob/master/docs/config.md#plugins). | ||
@@ -31,2 +32,19 @@ ## Installation | ||
### Testplane usage | ||
Add plugin to your `testplane` config file: | ||
```ts | ||
export default { | ||
// ... | ||
plugins: { | ||
'json-reporter/testplane': { | ||
enabled: true, | ||
path: 'my/custom/report.json' | ||
} | ||
}, | ||
//... | ||
} | ||
``` | ||
### Hermione usage | ||
@@ -33,0 +51,0 @@ |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
17362
14
182
81
1