From 9061098b0f6a7a8cfd062dcdda6d2d6740795877 Mon Sep 17 00:00:00 2001 From: Hikari Date: Tue, 3 Mar 2026 17:46:31 -0800 Subject: [PATCH] docs: require tests for all changes in CLAUDE.md --- CLAUDE.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 380a241..c56c41b 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -39,7 +39,7 @@ git push https://hikari:TOKEN@git.nhcarrigan.com/nhcarrigan/hikari-desktop.git < ## Testing Requirements -All new features, fixes, and significant changes should include tests whenever possible: +**All changes MUST include tests.** This is non-negotiable — no feature, bug fix, or refactor should be committed without corresponding test coverage. If a change cannot be tested (e.g. pure UI layout, Tauri IPC calls that are impossible to mock), document why in a comment. - **Frontend tests**: Use Vitest with `@testing-library/svelte` for component tests - **Test files**: Place test files next to the code they test with `.test.ts` or `.spec.ts` extension @@ -137,16 +137,16 @@ describe("FeatureName", () => { }); ``` -### Adding Tests for New Features +### Adding Tests for All Changes -When developing new features, always add corresponding tests: +Every change — features, bug fixes, refactors — must include tests: 1. **Before implementing**: Consider what needs testing (happy path, edge cases, errors) 2. **During implementation**: Write tests alongside the code 3. **After implementation**: Run `pnpm test:coverage` to verify coverage remains high 4. **Before committing**: Ensure `check-all.sh` passes (includes all tests) -The goal is to maintain our near-100% coverage as the codebase grows, so future refactoring and changes can be made with confidence! +**Do not commit changes without tests.** The goal is to maintain near-100% coverage as the codebase grows, so future refactoring can be done with confidence! ## Quality Assurance