Closed
Description
Describe the bug
store
is undefined in child components.
To Reproduce
Steps to reproduce the behavior:
- Clone https://github.com/mediafreakch/vue-testing-library-bug
- run
npm install
- run
npm test
The second test fails.
Expected behavior
Second test passes.
Screenshots
Related information:
@testing-library/vue
version: 4.1.0Vue
version: 2.6.11node
version: 12.13.1npm
(oryarn
) version: npm 6.12.1
Relevant code or config (if any)
Additional context
Unfortunately the example doesn't run in Codesandbox. There is an issue with they're bundler.
You need to clone the repo and run it locally to reproduce the bug.
I managed to get the same app tested using pure @vue/test-utils
. I will link the corresponding codesandbox example as soon as I have recovered it. Codesandbox example of @vue/test-utils