Skip to content

Commit 91b2689

Browse files
authored
Simplify coverage tooling (#468)
1 parent 2885224 commit 91b2689

File tree

4 files changed

+4
-52
lines changed

4 files changed

+4
-52
lines changed

.github/workflows/nodejs.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,3 @@ jobs:
3333
- run: npm run lint
3434
- run: npx prettier --check .
3535
- run: npm run coverage
36-
- run: npx nyc report --reporter=text

.waiting.html

Lines changed: 0 additions & 23 deletions
This file was deleted.

CONTRIBUTING.md

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -119,26 +119,14 @@ var util = require("./util");
119119

120120
## Checking code coverage
121121

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

125124
```shell
126125
$ npm run coverage
127126
$ open coverage/index.html
128127
```
129128

130-
This will allow you to browse to red sections of the code that need
131-
more attention. Even more cool, however, is to run:
132-
133-
```shell
134-
$ npm run dev
135-
```
136-
137-
(On some operating systems, this may pop up a request for node to be able to open a socket. Click "Allow" or the equivalent.)
138-
139-
This will run the coverage tools, and monitor all of the files in the
140-
project, re-running the coverage tools and refreshing the browser when
141-
any files change. There will be a small web server running on port 4103 to enable this. Control-C to stop.
129+
This will allow you to browse to red sections of the code that need more attention.
142130

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

package.json

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,8 @@
6666
"license": "BSD-3-Clause",
6767
"scripts": {
6868
"lint": "eslint --fix *.js lib/ test/",
69-
"prebuild": "npm run lint",
7069
"test": "node test/run-tests.js",
71-
"coverage": "nyc node test/run-tests.js",
72-
"setup": "mkdir -p coverage && cp -n .waiting.html coverage/index.html || true",
73-
"dev:live": "live-server --port=4103 --ignorePattern='(js|css|png)$' coverage",
74-
"dev:watch": "watch 'npm run coverage' lib/ test/",
75-
"predev": "npm run setup",
76-
"dev": "npm-run-all -p --silent dev:*",
70+
"coverage": "nyc --reporter=text --reporter=html npm test",
7771
"prettier": "prettier --write .",
7872
"clean": "rm -rf coverage .nyc_output",
7973
"toc": "doctoc --title '## Table of Contents' README.md && doctoc --title '## Table of Contents' CONTRIBUTING.md"
@@ -82,14 +76,8 @@
8276
"doctoc": "^1.3.1",
8377
"eslint": "^8.24.0",
8478
"eslint-config-prettier": "^8.5.0",
85-
"live-server": "^1.2.0",
86-
"npm-run-all": "^4.1.2",
8779
"nyc": "^11.7.1",
88-
"prettier": "^2.7.1",
89-
"watch": "^1.0.2"
90-
},
91-
"nyc": {
92-
"reporter": "html"
80+
"prettier": "^2.7.1"
9381
},
9482
"dependencies": {
9583
"whatwg-url": "^7.0.0"

0 commit comments

Comments
 (0)