@@ -221,42 +221,36 @@ describe('VueQueryPlugin', () => {
221221 } )
222222
223223 describe ( 'when called with custom client config' , ( ) => {
224- itIf ( isVue2 ) (
225- 'should instantiate a client with the provided config' ,
226- ( ) => {
227- const appMock = getAppMock ( )
228- const config = {
229- defaultOptions : { queries : { enabled : true } } ,
230- }
231- VueQueryPlugin . install ( appMock , {
232- queryClientConfig : config ,
233- } )
224+ itIf ( isVue2 ) ( 'should instantiate a client with the provided config' , ( ) => {
225+ const appMock = getAppMock ( )
226+ const config = {
227+ defaultOptions : { queries : { enabled : true } } ,
228+ }
229+ VueQueryPlugin . install ( appMock , {
230+ queryClientConfig : config ,
231+ } )
234232
235- appMock . _mixin . beforeCreate ?. call ( appMock )
236- const client = appMock . _provided . VUE_QUERY_CLIENT as QueryClient
237- const defaultOptions = client . getDefaultOptions ( )
238-
239- expect ( defaultOptions ) . toEqual ( config . defaultOptions )
240- } ,
241- )
242-
243- itIf ( isVue3 ) (
244- 'should instantiate a client with the provided config' ,
245- ( ) => {
246- const appMock = getAppMock ( )
247- const config = {
248- defaultOptions : { queries : { enabled : true } } ,
249- }
250- VueQueryPlugin . install ( appMock , {
251- queryClientConfig : config ,
252- } )
233+ appMock . _mixin . beforeCreate ?. call ( appMock )
234+ const client = appMock . _provided . VUE_QUERY_CLIENT as QueryClient
235+ const defaultOptions = client . getDefaultOptions ( )
253236
254- const client = ( appMock . provide as Mock ) . mock . calls [ 0 ] ?. [ 1 ]
255- const defaultOptions = client . getDefaultOptions ( )
237+ expect ( defaultOptions ) . toEqual ( config . defaultOptions )
238+ } )
256239
257- expect ( defaultOptions ) . toEqual ( config . defaultOptions )
258- } ,
259- )
240+ itIf ( isVue3 ) ( 'should instantiate a client with the provided config' , ( ) => {
241+ const appMock = getAppMock ( )
242+ const config = {
243+ defaultOptions : { queries : { enabled : true } } ,
244+ }
245+ VueQueryPlugin . install ( appMock , {
246+ queryClientConfig : config ,
247+ } )
248+
249+ const client = ( appMock . provide as Mock ) . mock . calls [ 0 ] ?. [ 1 ]
250+ const defaultOptions = client . getDefaultOptions ( )
251+
252+ expect ( defaultOptions ) . toEqual ( config . defaultOptions )
253+ } )
260254 } )
261255
262256 describe ( 'when persister is provided' , ( ) => {
0 commit comments