@@ -46,7 +46,7 @@ describe("App Store", () => {
4646 load : vi . fn ( ) . mockImplementation ( ( ) => { } ) ,
4747 }
4848 const mock_store_2 = {
49- $id : "cartStore " ,
49+ $id : "geodeStore " ,
5050 save : vi . fn ( ) . mockImplementation ( ( ) => { } ) ,
5151 load : vi . fn ( ) . mockImplementation ( ( ) => { } ) ,
5252 }
@@ -56,7 +56,7 @@ describe("App Store", () => {
5656
5757 expect ( app_store . stores . length ) . toBe ( 2 )
5858 expect ( app_store . stores [ 0 ] . $id ) . toBe ( "userStore" )
59- expect ( app_store . stores [ 1 ] . $id ) . toBe ( "cartStore " )
59+ expect ( app_store . stores [ 1 ] . $id ) . toBe ( "geodeStore " )
6060 } )
6161 } )
6262
@@ -72,7 +72,7 @@ describe("App Store", () => {
7272 load : vi . fn ( ) . mockImplementation ( ( ) => { } ) ,
7373 }
7474 const mock_store_2 = {
75- $id : "cartStore " ,
75+ $id : "geodeStore " ,
7676 save : vi . fn ( ) . mockImplementation ( ( ) => ( { items : [ ] , total : 0 } ) ) ,
7777 load : vi . fn ( ) . mockImplementation ( ( ) => { } ) ,
7878 }
@@ -86,7 +86,7 @@ describe("App Store", () => {
8686 expect ( mock_store_2 . save ) . toHaveBeenCalledTimes ( 1 )
8787 expect ( snapshot ) . toEqual ( {
8888 userStore :
{ name :
"toto" , email :
"[email protected] " } , 89- cartStore : { items : [ ] , total : 0 } ,
89+ geodeStore : { items : [ ] , total : 0 } ,
9090 } )
9191 } )
9292
@@ -126,19 +126,19 @@ describe("App Store", () => {
126126 const appStore = useAppStore ( )
127127
128128 const userStore = { $id : "userStore" , load : vi . fn ( ) . mockResolvedValue ( ) }
129- const cartStore = { $id : "cartStore " , load : vi . fn ( ) . mockResolvedValue ( ) }
129+ const geodeStore = { $id : "geodeStore " , load : vi . fn ( ) . mockResolvedValue ( ) }
130130
131131 appStore . registerStore ( userStore )
132- appStore . registerStore ( cartStore )
132+ appStore . registerStore ( geodeStore )
133133
134134 const snapshot = {
135135 userStore : { some : "data" } ,
136- cartStore : { other : "data" } ,
136+ geodeStore : { other : "data" } ,
137137 }
138138
139139 await appStore . load ( snapshot )
140140 expect ( userStore . load ) . toHaveBeenCalledTimes ( 1 )
141- expect ( cartStore . load ) . toHaveBeenCalledTimes ( 1 )
141+ expect ( geodeStore . load ) . toHaveBeenCalledTimes ( 1 )
142142 } )
143143
144144 test ( "skip stores without load method" , ( ) => {
0 commit comments