This is unit test coverage report manager.
Edit webpack.config.js
and package.json
files in the webml-pollyfill object.
-
Open
webpack.config.js
file:Change:
module: {rules: [{ test: /\.js$/, loader: 'babel-loader', exclude: /node_modules/ }]}
to:
module: {rules: [{test: /\.js$/, use: {loader: 'babel-loader', options: {plugins: ['istanbul']}}, exclude: /node_modules/}]}
-
Open
package.json
file:Add:
"babel-plugin-istanbul": "^5.1.0"
into
devDependencies
-
Build and start the webml-pollyfill object.
$ npm install
There are three fields in the config.json
:
- webmlpolyfillCommit:
{string}
, the commit number of webml-pollyfill object. - remoteURL:
{string}
, remote test URL or local URLhttp://localhost:8080/test/index.html
. - browser:
{string}
, the browser to run unit test page and get coverage report.
$ npm start
- General report:
./coverage
display current test coverage reports. - Detailed report:
./report-tree
display the history of test coverage reports.
Linux | Mac | Android | Windows |
---|---|---|---|
PASS | PASS | TODO | TODO |