diff --git a/.gitignore b/.gitignore index 661349ff46..99b0b4e250 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .DS_Store +coverage/ dist/ docs/.vitepress/cache docs/.vitepress/dist diff --git a/package.json b/package.json index 52e38cbfa3..f176ce9a96 100644 --- a/package.json +++ b/package.json @@ -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", @@ -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",