Skip to content

Commit 2324c65

Browse files
G-Rathcexbrayat
authored andcommitted
docs: add note about mocking requestAnimationFrame for transitions
1 parent 012b0a5 commit 2324c65

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

docs/guide/advanced/transitions.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,9 @@ Potential solutions:
6666
- You can create your own transition stub that can handle these hooks if necessary.
6767
- You can spy the warning in the test to silence it.
6868
:::
69+
70+
If you do turn off auto stubbing, note that you might also need to mock `requestAnimationFrame` to ensure that the javascript hooks fire properly:
71+
72+
```js
73+
vi.spyOn(window, 'requestAnimationFrame').mockImplementation(cb => cb());
74+
```

0 commit comments

Comments
 (0)