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

'find did not return Component' since beta.9 for jest example #399

Closed
dvic opened this issue Feb 1, 2018 · 2 comments
Closed

'find did not return Component' since beta.9 for jest example #399

dvic opened this issue Feb 1, 2018 · 2 comments
Labels

Comments

@dvic
Copy link

dvic commented Feb 1, 2018

Version

1.0.0-beta.11

Reproduction link

https://codesandbox.io/s/3ypyovl7ym

Steps to reproduce

  • git clone https://github.com/vuejs/vue-test-utils-jest-example.git
  • npm install --save-dev vue-test-utils@1.0.0-beta.9 (also occurs with beta.11)
  • npm install
  • npm run test

What is expected?

All tests pass.

What is actually happening?

> jest

 FAIL  test/MessageToggle.spec.js
  ● MessageToggle.vue › toggles msg passed to Message when button is clicked

    [vue-test-utils]: find did not return Component, cannot call props() on empty Wrapper

      at throwError (node_modules/vue-test-utils/dist/vue-test-utils.js:11:9)
      at Object.<anonymous> (test/MessageToggle.spec.js:11:29)
          at new Promise (<anonymous>)
          at <anonymous>
      at process._tickCallback (internal/process/next_tick.js:188:7)

 PASS  test/List.spec.js
 PASS  test/Message.spec.js

Test Suites: 1 failed, 2 passed, 3 total
Tests:       1 failed, 4 passed, 5 total
Snapshots:   1 passed, 1 total
Time:        1.002s
Ran all test suites.
@lusarz
Copy link
Contributor

lusarz commented Feb 1, 2018

After short investigation I think that key information may be that Message component is functional:
https://github.com/vuejs/vue-test-utils-jest-example/blob/8445f03efd7d6070dab568e07620004c8bdd9fe6/src/components/Message.js

@dvic
Copy link
Author

dvic commented Feb 1, 2018

Ah yes, that is probably it. I commented on #296 that the issue is probably still not solved.

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

No branches or pull requests

3 participants