Description
Describe the bug
As of the test-utils version 2.0.0-rc.21, some of our tests started failing seemingly because the DOM was not being updated. For one component I managed to narrow the cause of this down to an equality check between two objects somehow no longer resolving to true, even when they both refer to the same object.
(Unfortunately the other components for which tests were broken are relatively old code, so I couldn't immediately verify whether those failures share a similar cause.)
To Reproduce
Here is a small repo in which the issue is reproduced: https://github.com/SkippedTurn/reproduction-recipe-test-utils. The line that seems to be causing the issue is ln7 in "TestComponent.vue".
In the above project, if the v-if is replaced with v-if="selectedField?.name === field.name"
so that the check is done on strings instead of Objects, everything does work again.
Expected behavior
The equality check resolves to true, and the associated tests succeed.
Note that, outside of the tests, the component works as intended with the latest version of Vue (3.2.33).
Related information:
@vue/test-utils
version: 2.0.0-rc.21Vue
version: 3.2.33node
version: 18.1.0npm
version: 8.8.0