Skip to content

fix(valid-expect): handle static expect APIs#930

Merged
veritem merged 1 commit into
vitest-dev:mainfrom
w3lld1:fix/valid-expect-static-apis
Jul 10, 2026
Merged

fix(valid-expect): handle static expect APIs#930
veritem merged 1 commit into
vitest-dev:mainfrom
w3lld1:fix/valid-expect-static-apis

Conversation

@w3lld1

@w3lld1 w3lld1 commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • classify expect.soft, expect.poll, and expect.element as expect APIs instead of matchers
  • validate their actual matcher chains and argument counts through the existing valid-expect logic
  • add coverage for valid chains, missing matchers, modifiers, and argument-count diagnostics

Validation

  • corepack pnpm test --run — 82 files, 2,357 tests passed
  • corepack pnpm typecheck
  • corepack pnpm lint:js
  • corepack pnpm format
  • corepack pnpm build

Local validation used Node.js 20.20.0; the repository CI matrix will additionally exercise Node.js 22 and 24 on Ubuntu and Windows.

Fixes #921
Fixes #922

@veritem veritem left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks

@veritem veritem merged commit 792320a into vitest-dev:main Jul 10, 2026
5 checks passed
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.

valid-expect should handle expect.poll and expect.element as Vitest expect APIs valid-expect should handle expect.soft as a Vitest expect API

2 participants