File tree Expand file tree Collapse file tree 1 file changed +6
-10
lines changed
Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -247,7 +247,8 @@ describe('setData', () => {
247247 expect ( wrapper . vm . getResult ( ) ) . toStrictEqual ( `test2: ${ expectedResult } ` )
248248 } )
249249
250- it ( 'should be possible to replace a primitive value with another' , async ( ) => {
250+ // https://github.com/vuejs/test-utils/issues/2257
251+ it ( 'should ignore prototype methods when using setData on objects' , async ( ) => {
251252 const wrapper = mount (
252253 defineComponent ( {
253254 template : '<div />' ,
@@ -261,18 +262,13 @@ describe('setData', () => {
261262 )
262263
263264 await wrapper . setData ( {
264- firstArray : [ ] ,
265- secondArray : [ ]
265+ firstArray : [ 1 , 2 ] ,
266+ secondArray : [ 3 , 4 ]
266267 } )
267268
268269 expect ( wrapper . vm . $data ) . toStrictEqual ( {
269- firstArray : [ ] ,
270- secondArray : [ ]
270+ firstArray : [ 1 , 2 ] ,
271+ secondArray : [ 3 , 4 ]
271272 } )
272-
273- expect ( Object . keys ( wrapper . vm . $data ) ) . toStrictEqual ( [
274- 'firstArray' ,
275- 'secondArray'
276- ] )
277273 } )
278274} )
You can’t perform that action at this time.
0 commit comments