Skip to content

Commit

Permalink
Add code coverage instructions to CONTRIBUTING.md
Browse files Browse the repository at this point in the history
  • Loading branch information
hildjj committed May 8, 2018
1 parent 3f2b104 commit 39db032
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions CONTRIBUTING.md
Expand Up @@ -16,6 +16,7 @@ very appreciated.
- [Submitting Pull Requests](#submitting-pull-requests)
- [Running Tests](#running-tests)
- [Writing New Tests](#writing-new-tests)
- [Checking code coverage](#checking-code-coverage)
- [Updating the `lib/mappings.wasm` WebAssembly Module](#updating-the-libmappingswasm-webassembly-module)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->
Expand Down Expand Up @@ -113,6 +114,29 @@ can use as well:
var util = require('./util');
```

## Checking code coverage

It's fun to find ways to test lines of code that aren't visited by
the tests yet.

```shell
$ npm run coverage
$ open coverage/index.html
```

This will allow you to browse to red sections of the code that need
more attention. Even more cool, however, is to run:

```shell
$ npm run dev
```

(On some operating systems, this may pop up a request for node to be able to open a socket. Click "Allow" or the equivalent.)

This will run the coverage tools, and monitor all of the files in the
project, re-running the coverage tools and refreshing the browser when
any files change. There will be a small web server running on port 4103 to enable this. Control-C to stop.

## Updating the `lib/mappings.wasm` WebAssembly Module

Ensure that you have the Rust toolchain installed:
Expand Down

0 comments on commit 39db032

Please sign in to comment.