Skip to content

test(testkit): await alias resolver rejection - #1512

Open
Anber wants to merge 1 commit into
masterfrom
anber/testkit-await-resolver-rejection
Open

Anber wants to merge 1 commit into
masterfrom
anber/testkit-await-resolver-rejection

Conversation

@Anber

@Anber Anber commented Oct 4, 2026

Copy link
Copy Markdown
Collaborator

Motivation

The aliased-specifier test starts an asynchronous rejection assertion but finishes before the assertion settles. afterEach can then dispose its evaluation broker while the transform is still running. With terminal broker disposal, this produces Eval broker has been disposed instead of the expected missing-module error, which Jest can attribute to the following resolver test.

Await the assertion so the expected rejection completes before cleanup starts.

Test plan

  • pnpm run prepare: 16 build tasks passed.
  • pnpm check:all: 32 tasks passed, including tests and type checks; ESLint and dependency consistency checks passed. Testkit: 150 tests and 279 snapshots passed, 2 tests skipped.
  • Controlled runs against WyW before and after terminal broker disposal confirmed the race: the original assertion left a runner alive before the change and failed after it; adding await passed and exited normally in all three repeated runs on each revision.

This only changes a test in the private testkit package; no release changeset is needed.

@changeset-bot

changeset-bot Bot commented Oct 4, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: ceb40db

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

This branch has not been deployed

No deployments
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