chore: run the adapter-bun unit tests in Bun - #16913
Open
Nic-Polumeyv wants to merge 1 commit into
Open
Conversation
|
|
Install the latest version of pnpm add https://pkg.svelte.dev/@sveltejs/kit/c/dcb160f4dd1cb85e724109d55a374a8a26c4af68Open in |
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 specs now run under
bun test, with realBun.semver,Bun.file, andBun.env, andspyOnrecording calls where assertions need them.Bun.serveand theBun.buildpipeline stay test doubles so the tests don't bind sockets or bundle. The build-generated modules (MANIFEST,ROUTES,SERVER,SERVER_OPTIONS) are still mocked, and sincemock.modulefixes a module's export names on first registration,test/mocks.tsregisters each with the union of exports its consumers use. Loads that need a fresh evaluation import with a unique query string, as there is novi.resetModules.Bun.versionand theBunglobal are frozen inside Bun, so the 1.4-floor guard is tested by spyingBun.semver.orderplus assertions pinning the real comparator's verdicts, canaries being the reason it usesorder(). The build-must-run-in-Bun error comes from running the adapter under a Node subprocess. CI installs Bun 1.4.0 in thetest:otherslegs.Stacked on #16880.