79176234

Date: 2024-11-11 02:35:16
Score: 1
Natty:
Report link

How about defineExpose - this will make the methods public for test purposes.

defineExpose({ showTopDown })

therefore in your test:

wrapper.vm.showTopDown // will be boolean

https://vuejs.org/api/sfc-script-setup#defineexpose

Reasons:
  • Probably link only (1):
  • Low length (1):
  • Has code block (-0.5):
  • Starts with a question (0.5): How
  • High reputation (-1):
Posted by: Simon