Skip to content

Commit 2f00cbd

Browse files
committed
Adding 'coverage.txt'
1 parent fac0c01 commit 2f00cbd

3 files changed

Lines changed: 14 additions & 1 deletion

File tree

.husky/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
#!/usr/bin/env sh
2-
npm test
2+
npm run build && npm run coverage

coverage.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
ℹ start of coverage report
2+
ℹ --------------------------------------------------------------
3+
ℹ file | line % | branch % | funcs % | uncovered lines
4+
ℹ --------------------------------------------------------------
5+
ℹ src | | | |
6+
ℹ constants.js | 100.00 | 100.00 | 100.00 |
7+
ℹ filesize.js | 100.00 | 100.00 | 100.00 |
8+
ℹ helpers.js | 100.00 | 100.00 | 100.00 |
9+
ℹ --------------------------------------------------------------
10+
ℹ all files | 100.00 | 100.00 | 100.00 |
11+
ℹ --------------------------------------------------------------
12+
ℹ end of coverage report

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
"build:analyze": "npm run rollup && npm run analyze:size",
3838
"analyze:size": "echo 'Bundle size analysis:' && du -h dist/* && echo 'Gzipped sizes:' && gzip -c dist/filesize.min.js | wc -c | awk '{print $1\" bytes (gzipped)\"}' && gzip -c dist/filesize.umd.min.js | wc -c | awk '{print $1\" bytes (umd gzipped)\"}'",
3939
"changelog": "auto-changelog -p",
40+
"coverage": "node --test --experimental-test-coverage --test-coverage-exclude=dist/** --test-coverage-exclude=tests/** --test-reporter=spec tests/**/*.test.js 2>&1 | grep -A 1000 \"start of coverage report\" > coverage.txt",
4041
"lint": "npx oxlint *.js benchmarks src tests && npx oxfmt *.js benchmarks src tests/unit --check",
4142
"fix": "npx oxlint --fix *.js benchmarks src tests && npx oxfmt *.js benchmarks src tests/unit --write",
4243
"test": "npm run lint && node --test --experimental-test-coverage tests/**/*.js",

0 commit comments

Comments
 (0)