Skip to content

Commit 194e681

Browse files
committed
Update error message (vuejs#761)
1 parent f1a4d54 commit 194e681

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

packages/test-utils/src/wrapper.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -664,8 +664,10 @@ export default class Wrapper implements BaseWrapper {
664664
data[key] === this.vm[key]
665665
) {
666666
throwError(
667-
`wrapper.setProps() called with ${key} property ` +
668-
`needs to create a new Object`
667+
`wrapper.setProps() called with the same object ` +
668+
`of the existing ${key} property. ` +
669+
`You must call wrapper.setProps() with a new object ` +
670+
`to trigger reactivity`
669671
)
670672
}
671673

test/specs/wrapper/setProps.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ describeWithShallowAndMount('setProps', mountingMethod => {
192192
}
193193
})
194194

195-
const message = '[vue-test-utils]: wrapper.setProps() called with obj property needs to create a new Object'
195+
const message = '[vue-test-utils]: wrapper.setProps() called with the same object of the existing obj property. You must call wrapper.setProps() with a new object to trigger reactivity'
196196
const fn = () => wrapper.setProps({ obj })
197197
expect(fn)
198198
.to.throw()

0 commit comments

Comments
 (0)