Skip to content

Commit 7690ebb

Browse files
committed
Allow propsData (mark as breaking change)
1 parent b23854a commit 7690ebb

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/vue-testing-library.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,12 @@ function render(
5151
additionalOptions = configurationCb(vuexStore, router)
5252
}
5353

54-
if (!mountOptions.propsData && !!mountOptions.props) {
55-
mountOptions.propsData = mountOptions.props
56-
delete mountOptions.props
54+
// If `propsData` is provided, rename it to `props`
55+
// Since this is gonna be a breaking channge, we can remove the
56+
// whole thing.
57+
if (!mountOptions.props && !!mountOptions.propsData) {
58+
mountOptions.props = mountOptions.propsData
59+
delete mountOptions.propsData
5760
}
5861

5962
const wrapper = mount(TestComponent, {

0 commit comments

Comments
 (0)