|
|
`test-test-runner.el` covered the `cj/test--do-*` helpers and the focus-add / focus-remove / extract-test-names families. The state machinery and small wrappers were the gap.
22 new tests cover:
- `cj/test--project-root`: nil when projectile is absent, expanded trailing-slash when present.
- `cj/test--state-key`: falls back to `default-directory` without a project root.
- `cj/test--project-state`: creates the entry lazily, reuses on second call.
- `cj/test--state-get` / `cj/test--state-put`: roundtrip + default fallback.
- `cj/test--current-focused-files` / `cj/test--current-mode` getter/setter pairs.
- `cj/test--sync-legacy-state`: mirrors per-project state into the public legacy vars.
- `cj/test--remember-loaded-project-root`: pushes once via `cl-pushnew`, no-op without a root.
- `cj/test--file-in-directory-p`: true for a subpath, false for a sibling.
- `cj/test--get-test-directory`: prefers `tests/` subdir, falls back to the global default.
- `cj/test--get-test-files`: lists `test-*.el` files only, basenames.
- `cj/test--ensure-test-dir-in-load-path`: adds the dir.
- `cj/test-focus-clear` / `cj/test-toggle-mode` / `cj/test-view-focused` / `cj/test-run-all`: behavior + messaging.
|