File tree Expand file tree Collapse file tree 1 file changed +13
-10
lines changed
Expand file tree Collapse file tree 1 file changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -318,17 +318,21 @@ describe('table > provider functions', () => {
318318
319319 it ( 'provider is called when filter object child property is changed' , async ( ) => {
320320 let lastProviderContext = null
321- const filter = {
322- a : '123'
323- }
324321 const provider = ctx => {
325322 lastProviderContext = ctx
326323 return testItems . slice ( )
327324 }
328- const wrapper = mount ( BTable , {
329- propsData : {
330- filter,
331- items : provider
325+ const app = {
326+ data ( ) {
327+ // We use `this.$data` to get around a "bug" in Vue test utils that
328+ // doesn't let us change a child property in an object and update
329+ //that prop with the same object reference
330+ return {
331+ a : '123'
332+ }
333+ } ,
334+ render ( h ) {
335+ h ( BTable , { props : { filter : this . $data , items : provider } } )
332336 }
333337 } )
334338
@@ -340,9 +344,8 @@ describe('table > provider functions', () => {
340344 } )
341345
342346 // Change the filter criteria child property, but not the object reference
343- filter . a = '456'
344- wrapper . setProps ( {
345- filter : filter
347+ wrapper . setData ( {
348+ a : '456'
346349 } )
347350
348351 await waitNT ( wrapper . vm )
You can’t perform that action at this time.
0 commit comments