diff --git a/README.md b/README.md index 02a3ea6..b0d99f0 100644 --- a/README.md +++ b/README.md @@ -153,7 +153,7 @@ bun dist/cli.js close test-session │ ├── types.ts # Shared TypeScript types │ ├── core/ │ │ ├── index.ts # Core exports -│ │ ├── launch.ts # Launch session logic +│ │ ├── open.ts # Launch session logic │ │ ├── close.ts # Close session logic │ │ └── utils.ts # Helper functions │ └── tools/ @@ -166,6 +166,19 @@ bun dist/cli.js close test-session └── 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 MIT diff --git a/package.json b/package.json index b62329d..0f4176d 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "scripts": { "build": "bun build src/index.ts src/cli.ts --outdir dist --target bun --format esm", "test": "bun test", + "coverage": "bun test --coverage", "prepublishOnly": "bun run build", "release": "bash ./scripts/release.sh" },