Skip to content

docs(transitions.md): add partial stub support #2431

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions docs/guide/advanced/transitions.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,14 @@ test('works with transitions', async () => {
expect(wrapper.get('p').text()).toEqual('hello')
})
```

## Partial support

The Vue Test Utils built-in transition stub is simple and doesn't cover all of of Vue's [Transition features](https://vuejs.org/guide/built-ins/transition). For instance [javascript hooks](https://vuejs.org/guide/built-ins/transition#javascript-hooks) are not supported. This limitation could potentially lead to Vue warnings.

::: tip
Potential solutions:
- You can turn off the auto stubbing by setting [global stubs transition](../../api/#global-stubs) to false
- You can create your own transition stub that can handle these hooks if necessary.
- You can spy the warning in the test to silence it.
:::