How to mock composable method in a component? #2094
Unanswered
qashier-ray-foo
asked this question in
Q&A
Replies: 2 comments 2 replies
-
As you can see in It's usually something like: vi.mock("@/composables/useSampleComposable", () =>({
mySuperComposableFunction: vi.fn()
})) |
Beta Was this translation helpful? Give feedback.
0 replies
-
I tried this method before, but when testing the component, the composable still is not mocked. 😅 |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I tried
vi.mock("@/composables/useSampleComposable")
but the composable is not mocked. Need helpBeta Was this translation helpful? Give feedback.
All reactions