You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, after Vitest 0.31, this breaks; EntireModule is no longer defined.
If you remove the vi.mock call, the module is defined (but of course, you lose your mock behavior).
Separating the import of the default and entire module into two separate lines continues to work in Vitest 0.31 as well, but the syntax of importing both in one line of code is valid syntax that should work.
This bug is expressed in Vitest 0.32 as well, but the issue appeared in our codebase while upgrading from 0.30.1 to 0.31.4
Describe the bug
Prior to Vitest 0.31, the following code worked just fine
However, after Vitest 0.31, this breaks;
EntireModule
is no longer defined.If you remove the
vi.mock
call, the module is defined (but of course, you lose your mock behavior).Separating the import of the default and entire module into two separate lines continues to work in Vitest 0.31 as well, but the syntax of importing both in one line of code is valid syntax that should work.
This bug is expressed in Vitest 0.32 as well, but the issue appeared in our codebase while upgrading from
0.30.1
to0.31.4
Reproduction
https://stackblitz.com/edit/vitest-dev-vitest-qerkpn?file=test%2Fadd.test.ts
The following test code results in a failure (shown in the attached screenshot)
System Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: