build: set up test coverage via bun (task 0003)
Add a bunfig.toml enabling coverage with text + lcov reporters, a test:coverage script, and gitignore the coverage/ output. Test files and the test-support helper are excluded so the numbers reflect product code only.
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -7,6 +7,9 @@ packages/bin/kitchen
|
|||||||
result
|
result
|
||||||
result-*
|
result-*
|
||||||
|
|
||||||
|
# test coverage output
|
||||||
|
coverage/
|
||||||
|
|
||||||
# direnv / nix-direnv cache
|
# direnv / nix-direnv cache
|
||||||
.direnv/
|
.direnv/
|
||||||
|
|
||||||
|
|||||||
8
bunfig.toml
Normal file
8
bunfig.toml
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
[test]
|
||||||
|
# Coverage is opt-in via `bun test --coverage` (see the test:coverage script).
|
||||||
|
# These settings only take effect when that flag is passed.
|
||||||
|
coverageReporter = ["text", "lcov"]
|
||||||
|
coverageDir = "coverage"
|
||||||
|
coverageSkipTestFiles = true
|
||||||
|
# test-support.ts is test scaffolding, not product code; keep it out of the numbers.
|
||||||
|
coveragePathIgnorePatterns = ["**/test-support.ts"]
|
||||||
@@ -8,6 +8,7 @@
|
|||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "bun test",
|
"test": "bun test",
|
||||||
|
"test:coverage": "bun test --coverage",
|
||||||
"lint": "biome check .",
|
"lint": "biome check .",
|
||||||
"format": "biome check --write .",
|
"format": "biome check --write .",
|
||||||
"postinstall": "bun2nix -o bun.nix"
|
"postinstall": "bun2nix -o bun.nix"
|
||||||
|
|||||||
Reference in New Issue
Block a user