useSortable integration mocking in Vitest #4545
Replies: 1 comment
-
Hey @alexmccabe! I'm here to help you with any bugs, questions, or contributions while you wait for a human maintainer. Let's tackle this issue together! The issue you're experiencing with the JS heap running out of memory when mocking the
By following these steps, you should be able to identify the root cause of the memory issue and adjust your mock or test setup accordingly. To continue talking to Dosu, mention @dosu. Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am testing a component that makes use of the
useSortable
function. The problem is, when I mock the return value ofuseSortable
to include theoption
function, then JS heap runs out of memory. If I don't mock this return value, everything is fine on Vitest side, however the code then doesn't run because it's missing theoption
return.Component:
Test
I am very confused by this behaviour, I've never experienced it before. Looking at the source for the
option
function, it doesn't do anything crazy.Mocking
@vueuse/core
andsortable.js
doesn't resolve the issue either. Even if I remove calls to theoption
function, this issue still occursBeta Was this translation helpful? Give feedback.
All reactions