@@ -13,17 +13,17 @@ describe('Basic test of vue-condition-watcher', () => {
1313 results : 9 ,
1414 } ,
1515 }
16- const { conditions, data, error, loading , execute } = useConditionWatcher ( config )
16+ const { conditions, data, error, isLoading , execute } = useConditionWatcher ( config )
1717
1818 expect ( isReactive ( conditions ) ) . toBeTruthy ( )
1919 expect ( isRef ( data ) ) . toBeTruthy ( )
2020 expect ( isRef ( error ) ) . toBeTruthy ( )
21- expect ( isRef ( loading ) ) . toBeTruthy ( )
22- expect ( loading . value ) . toBeTypeOf ( 'boolean' )
21+ expect ( isRef ( isLoading ) ) . toBeTruthy ( )
22+ expect ( isLoading . value ) . toBeTypeOf ( 'boolean' )
2323 expect ( execute ) . toBeTypeOf ( 'function' )
2424 } )
2525
26- it ( `Check data, error, loading is readonly` , ( ) => {
26+ it ( `Check data, error, isLoading is readonly` , ( ) => {
2727 const config = {
2828 fetcher : ( params ) => new Promise ( ( resolve ) => resolve ( params ) ) ,
2929 conditions : {
@@ -32,11 +32,11 @@ describe('Basic test of vue-condition-watcher', () => {
3232 } ,
3333 }
3434
35- const { data, error, loading } = useConditionWatcher ( config )
35+ const { data, error, isLoading } = useConditionWatcher ( config )
3636
3737 expect ( isReadonly ( data ) ) . toBeTruthy ( )
3838 expect ( isReadonly ( error ) ) . toBeTruthy ( )
39- expect ( isReadonly ( loading ) ) . toBeTruthy ( )
39+ expect ( isReadonly ( isLoading ) ) . toBeTruthy ( )
4040 } )
4141
4242 it ( `Condition should be change` , ( ) => {
@@ -114,9 +114,9 @@ describe('Basic test of vue-condition-watcher', () => {
114114// })
115115// })
116116
117- // it(`Loading state should return true until promise resolve`, () => {
117+ // it(`isLoading state should return true until promise resolve`, () => {
118118// const vm = createApp({
119- // template: `<div>loading :{{loading }}, result:{{data}}</div>`,
119+ // template: `<div>isLoading :{{isLoading }}, result:{{data}}</div>`,
120120// setup() {
121121// const config = {
122122// fetcher: () => new Promise((resolve) => setTimeout(() => resolve('ConditionWatcher'), 200)),
@@ -131,9 +131,9 @@ describe('Basic test of vue-condition-watcher', () => {
131131
132132// doAsync(async () => {
133133// await tick(1)
134- // expect(vm.$el.textContent).toBe('loading :true, result:')
134+ // expect(vm.$el.textContent).toBe('isLoading :true, result:')
135135// await tick(1)
136- // expect(vm.$el.textContent).toBe('loading :false, result:ConditionWatcher')
136+ // expect(vm.$el.textContent).toBe('isLoading :false, result:ConditionWatcher')
137137// })
138138// })
139139
0 commit comments