File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ very appreciated.
1616- [ Submitting Pull Requests] ( #submitting-pull-requests )
1717- [ Running Tests] ( #running-tests )
1818- [ Writing New Tests] ( #writing-new-tests )
19+ - [ Checking code coverage] ( #checking-code-coverage )
1920- [ Updating the ` lib/mappings.wasm ` WebAssembly Module] ( #updating-the-libmappingswasm-webassembly-module )
2021
2122<!-- END doctoc generated TOC please keep comment here to allow auto update -->
@@ -113,6 +114,29 @@ can use as well:
113114var util = require (' ./util' );
114115```
115116
117+ ## Checking code coverage
118+
119+ It's fun to find ways to test lines of code that aren't visited by
120+ the tests yet.
121+
122+ ``` shell
123+ $ npm run coverage
124+ $ open coverage/index.html
125+ ```
126+
127+ This will allow you to browse to red sections of the code that need
128+ more attention. Even more cool, however, is to run:
129+
130+ ``` shell
131+ $ npm run dev
132+ ```
133+
134+ (On some operating systems, this may pop up a request for node to be able to open a socket. Click "Allow" or the equivalent.)
135+
136+ This will run the coverage tools, and monitor all of the files in the
137+ project, re-running the coverage tools and refreshing the browser when
138+ any files change. There will be a small web server running on port 4103 to enable this. Control-C to stop.
139+
116140## Updating the ` lib/mappings.wasm ` WebAssembly Module
117141
118142Ensure that you have the Rust toolchain installed:
You can’t perform that action at this time.
0 commit comments