From 2201d86af038fd442eb39231089197ac25d1dbce Mon Sep 17 00:00:00 2001 From: Paul Bakaus Date: Fri, 20 Mar 2026 18:34:42 -0700 Subject: [PATCH] Add test fixture for short text in wide containers, document test runner - Add short-text-in-wide-container examples to quality-should-pass fixture - Add Testing section to CLAUDE.md - Revert unnecessary line-length estimatedLines guard (textLen > 80 already sufficient) Co-Authored-By: Claude Opus 4.6 (1M context) --- CLAUDE.md | 8 ++++++++ tests/fixtures/antipatterns/quality-should-pass.html | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/CLAUDE.md b/CLAUDE.md index 4c4112753..77b564130 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -42,6 +42,14 @@ Source files use placeholders that get replaced per-provider: - `{{config_file}}` - Config file name (CLAUDE.md, .cursorrules, etc.) - `{{ask_instruction}}` - How to ask user questions +## Testing + +```bash +bun run test # Run all tests +``` + +Unit tests (build, detector logic) run via `bun test`. Fixture tests (jsdom-based HTML detection) run via `node --test` because bun is too slow with jsdom. The `test` script handles this split automatically. + ## CLI Impeccable includes a CLI for running anti-pattern detection outside of AI harnesses: diff --git a/tests/fixtures/antipatterns/quality-should-pass.html b/tests/fixtures/antipatterns/quality-should-pass.html index 5e97b9ed9..aae801d66 100644 --- a/tests/fixtures/antipatterns/quality-should-pass.html +++ b/tests/fixtures/antipatterns/quality-should-pass.html @@ -121,6 +121,12 @@

This paragraph has a max-width of 65ch, keeping the line length comfortable for reading. The eye can easily track from the end of one line to the beginning of the next.

+

Short Text in Wide Container (OK)

+
+

This is a short sentence in a wide container.

+

Just a few words here.

+
+

Good Padding

This container has 16px padding, giving the text room to breathe within its border.