Skip to content

feat: support expect.assert for type narrowing#8695

Merged
sheremet-va merged 1 commit intovitest-dev:mainfrom
sheremet-va:feat/expect-assert
Oct 12, 2025
Merged

feat: support expect.assert for type narrowing#8695
sheremet-va merged 1 commit intovitest-dev:mainfrom
sheremet-va:feat/expect-assert

Conversation

@sheremet-va
Copy link
Member

Description

Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

  • It's really useful if your PR references an issue where it is discussed ahead of time. If the feature is substantial or introduces breaking changes without a discussion, PR might be closed.
  • Ideally, include a test that fails without this PR but passes with it.
  • Please, don't make changes to pnpm-lock.yaml unless you introduce a new test example.
  • Please check Allow edits by maintainers to make review process faster. Note that this option is not available for repositories that are owned by Github organizations.

Tests

  • Run the tests with pnpm test:ci.

Documentation

  • If you introduce new functionality, document it. You can run documentation with pnpm run docs command.

Changesets

  • Changes in changelog are generated from PR name. Please, make sure that it explains your changes in an understandable manner. Please, prefix changeset messages with feat:, fix:, perf:, docs:, or chore:.

@netlify
Copy link

netlify bot commented Oct 12, 2025

Deploy Preview for vitest-dev ready!

Name Link
🔨 Latest commit 542aac1
🔍 Latest deploy log https://app.netlify.com/projects/vitest-dev/deploys/68eb86b9b8bf1c0008d482e7
😎 Deploy Preview https://deploy-preview-8695--vitest-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@sheremet-va sheremet-va changed the title feat: support expect.assert for type narrowing feat: support expect.assert for type narrowing Oct 12, 2025
@sheremet-va sheremet-va merged commit fe5895d into vitest-dev:main Oct 12, 2025
13 of 14 checks passed
@hi-ogawa
Copy link
Contributor

Wow, this is nice! It's been annoying to separately import assert just for this purpose.

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.

2 participants