istanbul-coverage-display
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "istanbul-coverage-display", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"main": "dist/index.cjs.js", | ||
@@ -21,4 +21,3 @@ "module": "dist/index.esm.js", | ||
"peerDependencies": { | ||
"react": "^16.7.0", | ||
"istanbul-lib-coverage": "^2.0.1" | ||
"react": "^16.0.0" | ||
}, | ||
@@ -25,0 +24,0 @@ "scripts": { |
# istanbul-coverage-display | ||
React component which can be added to instrumentation build to display coverage report of testing | ||
React component which can be added to instrumentation build to display coverage report of testing. | ||
To install | ||
``` | ||
npm install istanbul-coverage-display | ||
``` | ||
It has a peer dependency of React 16. This component should be part of the test build only. In the test build, you should be using `babel-plugin-istanbul` | ||
to instrument the source code. This component has a peer (indirect) dependency on `istanbul-lib-coverage` installed by `babel-plugin-istanbul`. | ||
Import using | ||
``` | ||
import Coverage from 'istanbul-coverage-display'; | ||
``` | ||
This component adds a button to one of the four corner of the browser window to show coverage report. The position prop accepts four values: | ||
one of bottomLeft, topLeft, bottomRight, topRight. By default, the button is at the bottomLeft. | ||
49971
1
19