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
wrapper.find({ ref }) returns correct ref when it is not inv-for directive. wrapper.find({ ref }) does NOT return correct ref when it is inv-for directive. wrapper.findComponent({ ref }) returns correct ref whenever it is in v-for directive or not.
Describe the bug
wrapper.find({ ref })
returns correct ref when it is not inv-for
directive.wrapper.find({ ref })
does NOT return correct ref when it is inv-for
directive.wrapper.findComponent({ ref })
returns correct ref whenever it is inv-for
directive or not.To Reproduce
TestComponent.vue
TestComponent.spec.js (jest)
That test fails with:
Expected behavior
The test above passes and correct ref returns(as not array?)
Related information:
@vue/test-utils
version: 2.0.2Vue
version: 3.2.37node
version: v14.18.2npm
(oryarn
) version: npm 8.14.0Additional context
Related code pointing to this bug:
test-utils/src/baseWrapper.ts
Lines 78 to 85 in e59981d
is not treat array returns.
On the other hand,
findComponent()
take care ofv-for
:test-utils/src/baseWrapper.ts
Lines 157 to 160 in e59981d
The text was updated successfully, but these errors were encountered: