Skip to content
New issue

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

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

Already on GitHub? # to your account

.props() don't receive data in when child component is extended and stubbed #746

Closed
Loremaster opened this issue Jun 21, 2018 · 3 comments
Closed
Assignees
Labels

Comments

@Loremaster
Copy link

Loremaster commented Jun 21, 2018

Version

1.0.0-beta.19

Reproduction link

https://github.com/Loremaster/vue-test-utils-issues

Steps to reproduce

  1. Download source code of the example
  2. Install packages $ yarn
  3. Run tests $ yarn test:unit

What is expected?

All tests should pass

What is actually happening?

Test is failing and child component doesn't receive prop (as it does when it's a non typescript component):

  ● List.vue › ListItem receives text as a prop

    expect(received).toEqual(expected)

    Expected value to equal:
      "Learn Vue"
    Received:
      undefined

    Difference:

      Comparing two different types of values. Expected string but received undefined.

      15 |     const wrapper = shallowMount(List);
      16 |     const listItem = wrapper.find(ListItem);
    > 17 |     expect(listItem.props().text).toEqual("Learn Vue");
         |                                   ^
      18 |   });
      19 | });
@Loremaster
Copy link
Author

@eddyerburgh it seems like a bug to me. Any updates from your side?

@eddyerburgh eddyerburgh changed the title .props() don't receive data when child component uses typescript .props() don't receive data in when child component is extended and stubbed Jun 26, 2018
@eddyerburgh eddyerburgh self-assigned this Jun 27, 2018
@Loremaster
Copy link
Author

Loremaster commented Jun 27, 2018

Thank you @eddyerburgh 👍Can't wait for new release!

@Loremaster
Copy link
Author

@eddyerburgh is it possible to create new release soon? We really need this fix in our project.

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

No branches or pull requests

2 participants