Skip to content

Commit e689b5e

Browse files
devpascoekazupon
authored andcommitted
Need to wrap propsData in propsData object (#876)
When comparing to vue/test/unit/features/options/propsData.spec.js it appears the propsData object needs to be wrapped in { propsData: thepayload }
1 parent 60584c8 commit e689b5e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/v2/guide/unit-testing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ import MyComponent from './MyComponent.vue'
9494
// helper function that mounts and returns the rendered text
9595
function getRenderedText (Component, propsData) {
9696
const Ctor = Vue.extend(Component)
97-
const vm = new Ctor({ propsData }).$mount()
97+
const vm = new Ctor({ propsData: propsData }).$mount()
9898
return vm.$el.textContent
9999
}
100100

0 commit comments

Comments
 (0)