Skip to content

chore: run the adapter-bun unit tests in Bun - #16913

Open
Nic-Polumeyv wants to merge 1 commit into
bun-adapter-1.4from
bun-adapter-tests-in-bun
Open

chore: run the adapter-bun unit tests in Bun#16913
Nic-Polumeyv wants to merge 1 commit into
bun-adapter-1.4from
bun-adapter-tests-in-bun

Conversation

@Nic-Polumeyv

@Nic-Polumeyv Nic-Polumeyv commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

The specs now run under bun test, with real Bun.semver, Bun.file, and Bun.env, and spyOn recording calls where assertions need them. Bun.serve and the Bun.build pipeline 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 since mock.module fixes a module's export names on first registration, test/mocks.ts registers each with the union of exports its consumers use. Loads that need a fresh evaluation import with a unique query string, as there is no vi.resetModules.

Bun.version and the Bun global are frozen inside Bun, so the 1.4-floor guard is tested by spying Bun.semver.order plus assertions pinning the real comparator's verdicts, canaries being the reason it uses order(). The build-must-run-in-Bun error comes from running the adapter under a Node subprocess. CI installs Bun 1.4.0 in the test:others legs.

Stacked on #16880.

@changeset-bot

changeset-bot Bot commented Aug 23, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: dcb160f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@pkg-svelte-dev

Copy link
Copy Markdown

Install the latest version of @sveltejs/kit from dcb160f:

pnpm add https://pkg.svelte.dev/@sveltejs/kit/c/dcb160f4dd1cb85e724109d55a374a8a26c4af68

Open in pkg.svelte.dev: https://pkg.svelte.dev/repos/kit/pr/16913

@svelte-docs-bot

Copy link
Copy Markdown

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