Anyone can teach me how can I do unit test with Form submit? #621
Unanswered
wang-natta
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, I'm getting started to learn Vue3 and start with shadcn-vue as UI library.
I searched for blog/manual/document and watched a video about unit testing of VueConf-2022 and try to following the to do Unit Test for my first component.
But I don't know why I couldn't catch and assert the emit data that passed to the target function.
Here I created a code sandbox to show what exactly happened. link here
I assert the result of submit with click "Login" button to be a 'form' or 'submit' emit and get the data object of
{ emai: '', password: ''}
but it came out to be
{"input":[[{"isTrusted":false,"_vts":1718805188456}],[{"isTrusted":false,"_vts":1718805188463}]],"click":[[{"isTrusted":false}]]}
I couldn't figure out why?
Beta Was this translation helpful? Give feedback.
All reactions