diff --git a/.opencode/skills/testing/SKILL.md b/.opencode/skills/testing/SKILL.md index 5ad5d04e6e..29ab7112f8 100644 --- a/.opencode/skills/testing/SKILL.md +++ b/.opencode/skills/testing/SKILL.md @@ -34,7 +34,8 @@ Before writing any test, read: 2. Module-specific testing memory for the affected module: - `mem:common/testing` — CLJC unit tests - `mem:frontend/testing` — CLJS unit tests, Playwright E2E - - `mem:backend/core` — JVM clojure.test conventions + - `mem:backend/testing` — JVM clojure.test conventions + - `mem:exporter/testing` — exporter unit tests ## Key Rules diff --git a/.serena/memories/backend/core.md b/.serena/memories/backend/core.md index 7b085856d1..9a567932b7 100644 --- a/.serena/memories/backend/core.md +++ b/.serena/memories/backend/core.md @@ -102,9 +102,5 @@ misleading linter/compiler output. See `mem:scripts/paren-repair`. ## Testing -IMPORTANT: all CLI commands must be executed from the `backend/` subdirectory. JVM tests are invoked directly via `clojure -M:dev:test` — there is no pnpm wrapper. If you need to filter output, tee to a temp file first: `clojure -M:dev:test 2>&1 | tee /tmp/penpot-test-output.txt`. See `mem:testing` for execution discipline. - -* **Coverage:** If code is added or modified in `src/`, corresponding tests in `test/backend_tests/` must be added or updated. -* **Isolated run:** `clojure -M:dev:test --focus backend-tests.my-ns-test` for a specific test namespace. -* **Regression run:** `clojure -M:dev:test` to ensure no regressions in related functional areas. -* **Principles:** Cross-cutting testing principles, anti-patterns, and verification checklist: `mem:testing`. +Backend test commands, coverage rules, and conventions: `mem:backend/testing`. +Cross-cutting testing principles, anti-patterns, and verification checklist: `mem:testing`. diff --git a/.serena/memories/backend/testing.md b/.serena/memories/backend/testing.md new file mode 100644 index 0000000000..66d6f8a246 --- /dev/null +++ b/.serena/memories/backend/testing.md @@ -0,0 +1,11 @@ +# Backend Testing + +JVM `clojure.test` (kaocha runner) under `backend/test/backend_tests/`. + +- READ `mem:testing` FIRST — it defines the execution discipline (no piping, tee to file, preferred commands) that applies to all JVM test runs. +- All CLI commands must be executed from the `backend/` subdirectory. +- Tests are invoked directly via `clojure -M:dev:test` (kaocha) — there is no pnpm wrapper. Kaocha auto-discovers test namespaces, so no runner registration is needed. +- Coverage: if code is added or modified in `src/`, corresponding tests in `test/backend_tests/` must be added or updated. +- Isolated run: `clojure -M:dev:test --focus backend-tests.my-ns-test` for a specific test namespace, or `clojure -M:dev:test --focus backend-tests.my-ns-test/my-test-var` for a specific test var. +- Regression run: `clojure -M:dev:test` to ensure no regressions in related functional areas. +- If you need to filter output, tee to a temp file first: `clojure -M:dev:test 2>&1 | tee /tmp/penpot-test-output.txt`. \ No newline at end of file diff --git a/.serena/memories/testing.md b/.serena/memories/testing.md index 295da86212..ce301ff5bb 100644 --- a/.serena/memories/testing.md +++ b/.serena/memories/testing.md @@ -13,7 +13,7 @@ and helpers, consult: builders, production-path change helpers - `mem:frontend/testing` — CLJS unit tests, Playwright E2E integration tests, live browser verification via nREPL -- Backend — JVM `clojure.test` under `backend/test/`; see `mem:backend/core` +- `mem:backend/testing` — JVM `clojure.test` under `backend/test/` ## When to Use