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
So it seems that v3.0.6 introduced some breaking change unintentionally (semver). Vite v3.0.5 works as expected, also tested v3.1.8 table and v3.2.0-beta.2 as well, results both: NOK.
In following reproduction:
In v3.0.5 and lower the package vue-meta is mocked correctly.
In v3.0.6 and higher the package vue-meta is NOT mocked at all.
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
luckylooke
changed the title
Vitest mock feature not working due to change introduced in vite v3.0.6
Vitest mock feature not working correctly due to change introduced in vite v3.0.6
Oct 19, 2022
This is happening because of #8659 and vitest needs to use the new option introduced by #10071.
The downstream issue is this one: vitest-dev/vitest#1484
Describe the bug
So it seems that v3.0.6 introduced some breaking change unintentionally (semver). Vite v3.0.5 works as expected, also tested v3.1.8 table and v3.2.0-beta.2 as well, results both: NOK.
In following reproduction:
In v3.0.5 and lower the package
vue-meta
is mocked correctly.In v3.0.6 and higher the package
vue-meta
is NOT mocked at all.Reproduction
https://stackblitz.com/edit/vue-vitest-demo-gk83pk?file=package.json
Steps to reproduce
check console.. you will see failed test
once you change (downgrade) version of vite to v3.0.5 you will get passed test
Or you may navigate to working example here https://stackblitz.com/edit/vue-vitest-demo-nl2dub?file=package.json which already have set vite version 3.0.5
System Info
Used Package Manager
npm
Logs
$ vitest --debug
Error: Unknown option
--debug
at async ESMLoader.import (https://vue-vitest-demo-dz15mu.w.staticblitz.com/blitz.3c06ff333fff62d153837b0d0df85b8ed07b008f.js:6:1209286)
at async i.loadESM (https://vue-vitest-demo-dz15mu.w.staticblitz.com/blitz.3c06ff333fff62d153837b0d0df85b8ed07b008f.js:6:246623)
at async handleMainPromise (https://vue-vitest-demo-dz15mu.w.staticblitz.com/blitz.3c06ff333fff62d153837b0d0df85b8ed07b008f.js:6:989295) {
name: 'CACError'
}
Validations
The text was updated successfully, but these errors were encountered: