docs: add local code coverage instructions

This commit is contained in:
2026-03-20 14:02:41 +05:30
parent ffdc5451ab
commit 0b88ea0763
2 changed files with 15 additions and 1 deletions
+14 -1
View File
@@ -153,7 +153,7 @@ bun dist/cli.js close test-session
│ ├── types.ts # Shared TypeScript types │ ├── types.ts # Shared TypeScript types
│ ├── core/ │ ├── core/
│ │ ├── index.ts # Core exports │ │ ├── index.ts # Core exports
│ │ ├── launch.ts # Launch session logic │ │ ├── open.ts # Launch session logic
│ │ ├── close.ts # Close session logic │ │ ├── close.ts # Close session logic
│ │ └── utils.ts # Helper functions │ │ └── utils.ts # Helper functions
│ └── tools/ │ └── tools/
@@ -166,6 +166,19 @@ bun dist/cli.js close test-session
└── README.md └── README.md
``` ```
## Local code coverage
The test suite can generate a coverage report locally.
```bash
# Run tests with coverage (HTML report generated in ./coverage)
bun test --coverage
# Open the HTML report
open coverage/index.html # macOS
```
The `coverage` directory is ignored by Git but can be inspected to see which lines are exercised.
## License ## License
MIT MIT
+1
View File
@@ -19,6 +19,7 @@
"scripts": { "scripts": {
"build": "bun build src/index.ts src/cli.ts --outdir dist --target bun --format esm", "build": "bun build src/index.ts src/cli.ts --outdir dist --target bun --format esm",
"test": "bun test", "test": "bun test",
"coverage": "bun test --coverage",
"prepublishOnly": "bun run build", "prepublishOnly": "bun run build",
"release": "bash ./scripts/release.sh" "release": "bash ./scripts/release.sh"
}, },