Skip to content

Commit 55d8e65

Browse files
authored
Add a way to measure test coverage (#777)
* Add a way to measure test coverage * Drop an accidentally added dependency * Changelog
1 parent e46e46a commit 55d8e65

File tree

4 files changed

+753
-9
lines changed

4 files changed

+753
-9
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ lib-cov
2121

2222
# Coverage directory used by tools like istanbul
2323
coverage
24+
.nyc_output
2425

2526
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
2627
.grunt

changelog.d/777.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add a way to measure test coverage.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"build:app": "tsc --build",
1414
"build:widget": "vite build --config widget/vite.config.ts",
1515
"test": "yarn test:unit && yarn test:integration",
16+
"test:coverage": "nyc --reporter=text --reporter=html mocha --exit --reporter list --ui bdd --require ts-node/register --recursive tests/*/*.ts",
1617
"test:unit": "mocha --require ts-node/register --recursive tests/unit/*.ts",
1718
"test:integration": "mocha --exit --reporter list --ui bdd --require ts-node/register --recursive tests/integration/*.ts",
1819
"test:postgres": "SLACKBRIDGE_TEST_ENABLEPG=yes mocha --reporter list --ui bdd --require ts-node/register --recursive tests/integration/PgDatastoreTest.ts",
@@ -85,6 +86,7 @@
8586
"eslint-plugin-react-hooks": "^4.6.0",
8687
"js-yaml": "^4.1.0",
8788
"mocha": "^10.0.0",
89+
"nyc": "^15.1.0",
8890
"postcss": "^8.4.21",
8991
"prom-client": "^14.0.1",
9092
"source-map-support": "^0.5.19",

0 commit comments

Comments
 (0)