-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
expect type export broken in 1.0.0 #4273
Comments
Hmm yes, I tried it also on Ubuntu now with the same problem. Here is a branch where I just updated the vitest version: https://github.com/embiem/epic-stack/tree/embiem/vitest-v1-update-issue-repro If you run Looking into
I can probably look into this on the vitest (specifically @vitest/expect) side later today. Need to get accustomed first as this is my first dive into the vitest codebase. |
This just augments types, the types themselves are inside |
Did you try npm instead of pnpm? |
I downloaded the tarball from https://registry.npmjs.org/vitest/-/vitest-1.0.0-beta.1.tgz (got this from So it might be build or npm (publish) related. |
These types are correct. |
I tested it and works fine |
Have the same problem with |
Should probably be fixed by this PR: #4322 You can manually update files to see if it does it for you. |
Yes. It works |
Describe the bug
While testing version 1.0.0-beta.1, I now get lots of type errors like:
This expression is not callable. Type 'ExpectStatic' has no call signatures.
And my previous
expect.extend
call now results inProperty 'extend' does not exist on type 'ExpectStatic'
.I am importing expect as usual:
import { expect } from 'vitest'
.My previously used vitest version was 0.34.5. There, the ExpectStatic interface in @vitest/expect/dist was:
With the beta version, the type is:
Reproduction
expect
api on vitest version 0.34.5tsc
System Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: