Skip to content

Add a shadow-cljs integration test#53

Merged
bbatsov merged 1 commit into
masterfrom
shadow-integration-test
Jul 9, 2026
Merged

Add a shadow-cljs integration test#53
bbatsov merged 1 commit into
masterfrom
shadow-integration-test

Conversation

@bbatsov

@bbatsov bbatsov commented Jul 8, 2026

Copy link
Copy Markdown
Member

The shadow-cljs completion path (complete-for-shadow-cljs) had zero coverage - the unit tests use a fake eval fn and the existing integration test drives a piggieback Node REPL. That's exactly why #47/#48 slipped through. This adds a real integration test: it boots a shadow-cljs server, connects a Node runtime, and asks for completions through the shadow path.

It also answers #48. Method completion via the . interop form ((.lo js/console) -> .log) works fine over shadow-cljs's Node runtime - I assert it here. So the missing method completions in #48 are specific to the browser runtime or a client that isn't sending completion context, not a bug in suitable's shadow handling.

Getting the runtime to connect took some digging: shadow's node-repl client needs the ws npm package, which a deps.edn project doesn't have by default - hence the package.json and the npm install step.

The test is isolated in src/test-integration behind a :shadow-test alias with its own CI job, since it needs JDK 21 and a Node runtime. make shadow-test runs it locally.

  • The commits are consistent with the contribution guidelines
  • You've added tests to cover your change(s)
  • All tests are passing
  • The new code is not generating reflection warnings
  • You've updated the changelog (if adding/changing user-visible functionality)

The whole complete-for-shadow-cljs path was untested - the unit tests use
a fake eval fn and the existing integration test drives a piggieback Node
REPL. This boots a real shadow-cljs server, connects a Node runtime and
asks for completions through the shadow path.

It also settles issue #48: method completion via the `.` interop form
(`(.lo js/console)` -> `.log`) works fine over shadow-cljs's Node runtime,
so the missing method completions reported there are specific to the
browser runtime or a client that doesn't send completion context.

The test is isolated in src/test-integration behind a :shadow-test alias
and its own CI job, because it needs JDK 21 and a Node runtime with the
`ws` npm package (npm install).
@bbatsov bbatsov merged commit 99cea7b into master Jul 9, 2026
8 of 9 checks passed
@bbatsov bbatsov deleted the shadow-integration-test branch July 9, 2026 05:54
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