Skip to content

Commit

Permalink
Add test coverage (observablehq#1818)
Browse files Browse the repository at this point in the history
* test coverage with c8

* use npx for c8

---------

Co-authored-by: Mike Bostock <[email protected]>
  • Loading branch information
2 people authored and chaichontat committed Jan 14, 2024
1 parent 6a80d91 commit fcd4674
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.DS_Store
coverage/
dist/
docs/.vitepress/cache
docs/.vitepress/dist
Expand Down
6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
],
"scripts": {
"test": "yarn test:mocha && yarn test:tsc && yarn test:lint && yarn test:prettier",
"test:coverage": "npx c8 yarn test:mocha",
"test:mocha": "mkdir -p test/output && mocha 'test/**/*-test.*' 'test/plot.js'",
"test:lint": "eslint src test",
"test:prettier": "prettier --check src test",
Expand Down Expand Up @@ -74,6 +75,11 @@
"vite": "4.4.7",
"vitepress": "1.0.0-beta.7"
},
"c8": {
"all": true,
"include": ["src/**/*.js"],
"reporter": ["text", "lcov"]
},
"dependencies": {
"d3": "^7.8.0",
"interval-tree-1d": "^1.0.0",
Expand Down

0 comments on commit fcd4674

Please sign in to comment.