Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't use components defined with Vue.extend as slot content when mounting #824

Closed
nekosaur opened this issue Jul 13, 2018 · 2 comments · Fixed by #826
Closed

Can't use components defined with Vue.extend as slot content when mounting #824

nekosaur opened this issue Jul 13, 2018 · 2 comments · Fixed by #826

Comments

@nekosaur
Copy link
Contributor

Version

1.0.0-beta.20

Reproduction link

https://github.com/nekosaur/vue-test-utils-repro

Steps to reproduce

Run yarn test

What is expected?

Test should pass

What is actually happening?

Test does not pass

yarn run v1.6.0
$ jest
 FAIL  test/Foo.spec.js
  Foo.vue
    ✕ it should render slot content (6ms)

  ● Foo.vue › it should render slot content

    [vue-test-utils]: slots[key] must be a Component, string or an array of Components

      at throwError (node_modules/@vue/test-utils/dist/vue-test-utils.js:11:9)
          at Array.forEach (<anonymous>)
      at Object.<anonymous> (test/Foo.spec.js:7:40)
          at new Promise (<anonymous>)
          at <anonymous>

Test Suites: 1 failed, 1 total
Tests:       1 failed, 1 total
Snapshots:   0 total
Time:        4.221s
Ran all test suites.
error Command failed with exit code 1.

Looks like isValidSlot assumes a simple component object definition, not a Vue.extend instance

@eddyerburgh
Copy link
Member

Thanks for the bug report.

Closed by #825

@nekosaur
Copy link
Contributor Author

#825 was for stubs, not slots. opened a new PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants