esdoc-coverage-plugin
Advanced tools
Comparing version 1.0.0 to 1.0.1
# Changelog | ||
## 1.1.0 (2017-09-09) | ||
- **Feat** | ||
- Add `kind` option ([#7](https://github.com/esdoc/esdoc-plugins/pull/7)) Thanks [@jaxx2104](https://github.com/jaxx2104) | ||
## 1.0.0 (2017-07-30) | ||
- Release |
{ | ||
"name": "esdoc-coverage-plugin", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "A coverage plugin for ESDoc", | ||
@@ -5,0 +5,0 @@ "author": "h13i32maru", |
@@ -13,3 +13,9 @@ # ESDoc Coverage Plugin | ||
"plugins": [ | ||
{"name": "esdoc-coverage-plugin", "option": {"enable": true}} | ||
{ | ||
"name": "esdoc-coverage-plugin", | ||
"option": { | ||
"enable": true, | ||
"kind": ["class", "method", "member", "get", "set", "constructor", "function", "variable"] | ||
} | ||
} | ||
] | ||
@@ -21,2 +27,4 @@ } | ||
`kind` is default `["class", "method", "member", "get", "set", "constructor", "function", "variable"]`. | ||
## LICENSE | ||
@@ -23,0 +31,0 @@ MIT |
@@ -13,4 +13,5 @@ const fs = require('fs'); | ||
if (!option.enable) return; | ||
const docs = this._docs.filter(v => ['class', 'method', 'member', 'get', 'set', 'constructor', 'function', 'variable'].includes(v.kind)); | ||
if (!('kind' in option)) option.kind = ['class', 'method', 'member', 'get', 'set', 'constructor', 'function', 'variable']; | ||
if (!option.kind) return; | ||
const docs = this._docs.filter(v => option.kind.includes(v.kind)); | ||
const expectCount = docs.length; | ||
@@ -17,0 +18,0 @@ let actualCount = 0; |
4146
53
33