Add a shadow-cljs integration test#53
Merged
Merged
Conversation
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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
wsnpm package, which a deps.edn project doesn't have by default - hence thepackage.jsonand thenpm installstep.The test is isolated in
src/test-integrationbehind a:shadow-testalias with its own CI job, since it needs JDK 21 and a Node runtime.make shadow-testruns it locally.