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
I have a test where I set the props when creating the wrapper. After testing everything lines up, I change my props with an await wrapper.setProps(). The following assertions pass, but the assertions for computed properties do not pass. As if they are not updating after the await.
I then thought to try removing the await and creating a .then() function to see if that works, and ran into this interesting issue. My test passes, but fails after within the .then() function.
This should create a quick Vite app with Vue 2.7 and Vitest.
Once created, the test runner should fire, and you will see that 1 test passes, and 1 test fails. They check the exact same stuff, just have to deal with the await vs then
System Info
Mac M1
Vite: 2.9.14
Vitest: 0.18.1
Node: 18.6.0 / 16.16.0 (I tried on both)
Vue: 2.7.7 (cannot upgrade to v3 yet :/ )
Describe the bug
I have a test where I set the props when creating the
wrapper
. After testing everything lines up, I change my props with anawait wrapper.setProps()
. The following assertions pass, but the assertions for computed properties do not pass. As if they are not updating after the await.I then thought to try removing the
await
and creating a.then()
function to see if that works, and ran into this interesting issue. My test passes, but fails after within the.then()
function.I believe this is similar to #1692
Reproduction
https://stackblitz.com/edit/vitest-dev-vitest-ef3jdp?file=test/computed.test.js
This should create a quick Vite app with Vue 2.7 and Vitest.
Once created, the test runner should fire, and you will see that 1 test passes, and 1 test fails. They check the exact same stuff, just have to deal with the
await
vsthen
System Info
Used Package Manager
yarn
Validations
The text was updated successfully, but these errors were encountered: