Skip to content

Cljs test improvements#804

Merged
borkdude merged 2 commits intomainfrom
cljs-test-builtin
Apr 17, 2026
Merged

Cljs test improvements#804
borkdude merged 2 commits intomainfrom
cljs-test-builtin

Conversation

@borkdude
Copy link
Copy Markdown
Member

No description provided.

The macro now converts (quote my.ns) at the call site to a plain
"my.ns" string before emitting, so users can write the cljs.test
idiom (run-tests 'my.ns) without depending on squint's quoted-symbol
runtime support (which doesn't exist). The runtime fn keeps its
existing signatures.

run-vars-with-once-fixtures now brackets each ns's tests with
:begin-test-ns / :end-test-ns reports — the events were declared in
report's case but never fired. Reporters (and plain output) now
print "Testing my.ns" before each ns's run, matching cljs.test.

Smoke test gains a regression for the quoted-symbol macro path and
asserts the Testing lines appear in output. CHANGELOG updated with
the user-visible cljs.test entry.
Adds core-async to the built-in test macros: (async done body)
expands to (js/Promise. (fn [done] body)). The deftest body returns
the Promise and test-var awaits it, so no ^:async marker on the
outer fn is needed. Lets users copy-paste cljs.test code that uses
the (async done ...) idiom without rewriting it.

Also added to builtin-refer-is-macro? so :refer [async] doesn't
emit a runtime import. Smoke test gets a regression. CHANGELOG and
TODO entries updated (#8 closed).
@borkdude borkdude merged commit c53de03 into main Apr 17, 2026
6 checks passed
@borkdude borkdude deleted the cljs-test-builtin branch April 17, 2026 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant