How can I test Composition API Computed Properties without mounting the component #1758
-
// Options Api
it("renders odd numbers", () => {
const localThis = { even: false }
expect(NumberRenderer.computed.numbers.call(localThis)).toBe("1, 3, 5, 7, 9")
}) |
Beta Was this translation helpful? Give feedback.
Answered by
freakzlike
Sep 6, 2022
Replies: 1 comment
-
That's not possible. You need to mount the component or move the computed into a composable. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
cexbrayat
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
That's not possible. You need to mount the component or move the computed into a composable.