From 2fbe815c2707323e17dbcd49fd75b566b98409f8 Mon Sep 17 00:00:00 2001 From: dal Date: Mon, 14 Jul 2025 08:34:39 -0600 Subject: [PATCH] claude fix for unit testing --- CLAUDE.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/CLAUDE.md b/CLAUDE.md index a09c48d19..7535147ce 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -70,8 +70,19 @@ pnpm run check:fix packages/ai ``` ### 5. Run Tests with Vitest + +**Important**: Always run unit tests before completing any task to ensure code changes don't break existing functionality. + ```bash -# Run all tests +# Run unit tests (excludes integration tests) - REQUIRED before task completion +pnpm run test:unit +pnpm run test:unit --filter=@buster/ai # For specific package + +# Run integration tests (only when requested by user) +pnpm run test:integration +pnpm run test:integration --filter=@buster/ai # For specific package + +# Run all tests (unit + integration) pnpm run test # Run tests for specific package @@ -84,6 +95,11 @@ pnpm run test path/to/file.test.ts pnpm run test:watch ``` +**Testing Guidelines**: +- Unit tests (`*.test.ts`) - Run these before marking any task as complete +- Integration tests (`*.int.test.ts`) - Only run when explicitly requested by the user +- Integration tests are automatically run in CI/CD pipelines + ## Code Quality Standards ### TypeScript Configuration