From 3d81d1c76e384ff356e4270049cf1f4e1e65375c Mon Sep 17 00:00:00 2001 From: alexion Date: Mon, 27 Jul 2026 22:23:43 -0400 Subject: [PATCH] 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. --- .gitignore | 3 +++ bunfig.toml | 8 ++++++++ package.json | 1 + 3 files changed, 12 insertions(+) create mode 100644 bunfig.toml diff --git a/.gitignore b/.gitignore index 69ae774..bae95d7 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,9 @@ packages/bin/kitchen result result-* +# test coverage output +coverage/ + # direnv / nix-direnv cache .direnv/ diff --git a/bunfig.toml b/bunfig.toml new file mode 100644 index 0000000..4c20355 --- /dev/null +++ b/bunfig.toml @@ -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"] diff --git a/package.json b/package.json index af0041e..fcd48b1 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,7 @@ ], "scripts": { "test": "bun test", + "test:coverage": "bun test --coverage", "lint": "biome check .", "format": "biome check --write .", "postinstall": "bun2nix -o bun.nix"