vue-test-utils: v1.1.4 regression
Subject of the issue
After upgrading from v1.1.3 to v1.1.4 some tests have started to fail.
Steps to reproduce
const wrapper = mount(MyComponent, {
propsData: {
items: [
{ name: 'woof' },
{ name: 'bork' }
]
}
});
const items = wrapper.findAllComponents({ name: 'MyComponentItem' });
const firstItem = wrapper.at(0);
// ^--- [vue-test-utils]: no item exists at 0
// ...
Expected behaviour
Tests should pass as it was before the upgrade.
Actual behaviour
Tests failed.
Possible Solution
Downgrade to v1.1.3.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 9
- Comments: 43 (20 by maintainers)
Great, I will test a bit more and release a new version this weekend.
Right, I missed your message. I see - one bug remaining.
Can you share the failing test (ideally, simplify it as much as possible). Is it just:
?
We can add it to this code base (probably with the current PR) and get this merged and released. I think it should not be too difficult once we have a reproduction.
Weird it’s only a RouterLinkStub test failing. That’s the only component we export. I wonder if that’s related. Are you using this exported component or a default stub?
Ok I was able to create a failing test in #1832 depending on my posted example! I added some comments because I encountered some problems. Please have a look @BeeMargarida. I still have no clue what causes it.