Closed blimmer closed 3 years ago
Looks like there are some typing issues β probably due to the extended type for the store
option? https://github.com/testing-library/vue-testing-library/pull/232/checks?check_run_id=2820969444#step:5:100
Thanks @afontcu - I updated this PR and tested it on my fork. I'm a little surprised that StoreOptions
and Store
are interchangeable but, if the test suite is working properly, it looks like they are!
Merging #232 (789f889) into master (4efca8a) will not change coverage. The diff coverage is
100.00%
.
@@ Coverage Diff @@
## master #232 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 3 3
Lines 99 99
Branches 33 33
=========================================
Hits 99 99
Impacted Files | Coverage Ξ | |
---|---|---|
src/render.js | 100.00% <100.00%> (ΓΈ) |
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 4efca8a...789f889. Read the comment docs.
Thank you for this! π
:tada: This PR is included in version 5.7.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
:tada: This PR is included in version 6.6.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
As currently written, the
store
property passed to therender
function must beStoreOptions
, which is a plain Javascript object passed tonew Vuex.Store()
in the render function.This is great for simple components and should definitely still be a supported option. However, it would be really useful for us to be able to pass a complex, instantiated Vuex store (generated by our common test helpers) as well.
This PR accomplishes this behavior by checking if the passed
store
is aninstance of Vuex.Store
and skipping thenew Vuex.Store()
call in that case.If this seems reasonable, I can also update the API documentation in the other repository π . Thanks for your time & consideration!