Skip to content

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

@dvic

Description

@dvic

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 [email protected] (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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions