Skip to content

store not available in child components #122

Closed
@mediafreakch

Description

@mediafreakch

Describe the bug
store is undefined in child components.

To Reproduce
Steps to reproduce the behavior:

  1. Clone https://github.com/mediafreakch/vue-testing-library-bug
  2. run npm install
  3. run npm test

The second test fails.

Expected behavior

Second test passes.

Screenshots

Related information:

  • @testing-library/vue version: 4.1.0
  • Vue version: 2.6.11
  • node version: 12.13.1
  • npm (or yarn) 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions