testing-library / vue-testing-library

🦎 Simple and complete Vue.js testing utilities that encourage good testing practices.
http://testing-library.com/vue
MIT License
1.08k stars 110 forks source link

Feature: Can provide a similar reactRender hook test library for vue? #157

Closed MayRain1999 closed 4 years ago

MayRain1999 commented 4 years ago

Can provide a similar reactRender hook test library for vue?

afontcu commented 4 years ago

Hi! I'm not sure what reactRender is (I don't think it is part of RTL's API). Can you elaborate, please? Maybe provide a valid use case where current Vue Testing Lib API is not able to solve :)

Thank you!

nickserv commented 4 years ago

I think they're referring to having something like react-hooks-testing-library for Vue.

afontcu commented 4 years ago

Hi! 👋

Oh, I see, that makes sense. I assume someone might want to test Composition API functions in isolation, but that's beyond the scope of Vue Testing Lib (similar to testing hooks, which is out of scope for React Testing Lib). For the time being, though, one can render a component and test its inputs/outputs no matter the paradigm.

I'll go ahead and close this issue as there isn't much to do here :)

MayRain1999 commented 4 years ago

This is an example https://github.com/xiaoping027/vue-renderhook/blob/master/test/index.test.ts

Hi 👋 Found that it can support testing