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.09k stars 109 forks source link

Add a Vue Apollo example #143

Closed cilice closed 4 years ago

cilice commented 4 years ago

Closes #141

I had some freedom the pick some kind of a mocking client for apollo since vue-apollo doesn't provide one. I also used screen, is that alright or should i redo it using the destructing approach used everywhere else?

codecov[bot] commented 4 years ago

Codecov Report

Merging #143 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #143   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines           69        69           
  Branches        13        13           
=========================================
  Hits            69        69           

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 7a7c0fd...293ab74. Read the comment docs.

cilice commented 4 years ago

I guess I should also add a note this is only for Apollo v2 and will not work with Apollo v3.

cilice commented 4 years ago

Things I've changed now:

I think this PR is in a good state now, feel free to merge. 🙌 ✨

afontcu commented 4 years ago

@cilice I think this comment went out the minute you pushed, you might have missed it xD

https://github.com/testing-library/vue-testing-library/pull/143#discussion_r429185365

cilice commented 4 years ago

Oh thats neat, it somehow never crossed my mind to solve it like this. It's great! I've changed it now and squashed it all into one commit.

cilice commented 4 years ago

@afontcu I think it’s ready to merge 🙏

afontcu commented 4 years ago

:tada: This PR is included in version 5.0.4 :tada:

The release is available on:

Your semantic-release bot :package::rocket: