Closed
Description
Version
1.0.0-beta.19
Reproduction link
https://github.com/Loremaster/vue-test-utils-issues
Steps to reproduce
- Download source code of the example
- Install packages
$ yarn
- 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 | });