Skip to content

Commit 84272ce

Browse files
committed
fix: improve readme
1 parent 4d59e26 commit 84272ce

File tree

1 file changed

+62
-1
lines changed

1 file changed

+62
-1
lines changed

README.md

Lines changed: 62 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# json-reporter
22

3-
[![npm](https://img.shields.io/npm/v/json-reporter.svg?maxAge=2592000)](https://www.npmjs.com/package/json-reporter)
3+
[![npm](https://img.shields.io/npm/v/json-reporter.svg)](https://www.npmjs.com/package/json-reporter)
44
[![Build Status](https://travis-ci.org/gemini-testing/json-reporter.svg?branch=master)](https://travis-ci.org/gemini-testing/json-reporter)
55
[![Coverage Status](https://img.shields.io/coveralls/gemini-testing/json-reporter.svg?style=flat)](https://coveralls.io/r/gemini-testing/json-reporter?branch=master)
66

@@ -19,3 +19,64 @@ and hermione plugins [here](https://github.com/gemini-testing/hermione#plugins).
1919
```bash
2020
npm install json-reporter
2121
```
22+
23+
## Usage
24+
25+
Plugin has following configuration:
26+
27+
* **enabled** (optional) `Boolean` – enable/disable the plugin; by default plugin is enabled
28+
* **path** (optional) `String` - path for saving json report file; by default json report will be saved into `json-reporter.json` inside current work directory.
29+
30+
Also there is ability to override plugin parameters by CLI options or environment variables
31+
(see [configparser](https://github.com/gemini-testing/configparser)).
32+
33+
### Gemini usage
34+
35+
Add plugin to your `gemini` config file:
36+
37+
```js
38+
module.exports = {
39+
// ...
40+
plugins: {
41+
'json-reporter/gemini': {
42+
enabled: true,
43+
path: 'my/custom/report.json'
44+
}
45+
},
46+
//...
47+
}
48+
```
49+
50+
### Hermione usage
51+
52+
Add plugin to your `hermione` config file:
53+
54+
```js
55+
module.exports = {
56+
// ...
57+
plugins: {
58+
'json-reporter/hermione': {
59+
enabled: true,
60+
path: 'my/custom/report.json'
61+
}
62+
},
63+
//...
64+
}
65+
```
66+
67+
## Testing
68+
69+
Run [mocha](http://mochajs.org) tests:
70+
```bash
71+
npm run test-unit
72+
```
73+
74+
Run tests with [istanbul](https://github.com/gotwarlost/istanbul) coverage calculation:
75+
```bash
76+
npm run cover
77+
```
78+
79+
Run [eslint](http://eslint.org) codestyle verification
80+
```bash
81+
npm run lint
82+
```

0 commit comments

Comments
 (0)