From 0d80e7951afabfe7851912dab7c1230c367bd08d Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Mon, 23 Nov 2026 22:11:17 +0000 Subject: [PATCH] :books: Clarify focused exporter test runs Document both runner registration sites and the environment needed when reusing a compiled test bundle. AI-assisted-by: gpt-6.1-terra --- .serena/memories/exporter/testing.md | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/.serena/memories/exporter/testing.md b/.serena/memories/exporter/testing.md index 189c1e852c..13af2a49a4 100644 --- a/.serena/memories/exporter/testing.md +++ b/.serena/memories/exporter/testing.md @@ -1,16 +1,5 @@ -# Exporter Testing +# Exporter testing -- READ `mem:testing` first. -- Tests use `cljs.test` and live under `exporter/test/exporter_tests/`. -- Register every test namespace in `exporter-tests.runner`. -- From `exporter/`: `pnpm run build:test` builds the Node test bundle without running tests. -- From `exporter/`: `pnpm run test` builds and runs tests with full output. -- From `exporter/`: `pnpm run test:quiet` builds and runs tests with reduced build output. -- After `build:test`, reuse the compiled bundle with `node target/tests/test.js`. -- For iterative focused runs, build once and reuse the compiled bundle. -- Focus a test namespace with `node target/tests/test.js --focus exporter-tests.renderer-svg-test`. -- Focus a test var with `node target/tests/test.js --focus exporter-tests.renderer-svg-test/creates-the-correct-gradient-element`. -- Set app log level by appending `--log-level warn` (or `trace|debug|info|warn|error`). -- `test:quiet` accepts forwarded options but rebuilds the bundle; prefer the direct runner after `build:test` for focused runs. -- From `exporter/`: `pnpm run check-fmt:clj` checks ClojureScript formatting. -- From `exporter/`: `pnpm run lint:clj` runs ClojureScript linting. +- READ `mem:testing` first. Tests use `cljs.test` under `exporter/test/exporter_tests/`. Add each test namespace both to the `:require` list and to `test-namespaces` in `exporter-tests.runner`. +- For a focused run, from `exporter/` compile with `pnpm run build:test`, then run `PENPOT_SECRET_KEY=test-secret-key node target/tests/test.js --focus exporter-tests.renderer-svg-test` (append `/test-var` to focus a var). Recompile after source or test changes: the direct runner executes the existing bundle. `--log-level warn` adjusts application logging. +- `pnpm run test` supplies a default test secret, but the direct runner and `test:quiet` do not; set `PENPOT_SECRET_KEY` when running them directly. `test:quiet` rebuilds even when forwarding a focus option. For the full module checks, including the test secret, see `mem:scripts/ci`.