@@ -53,7 +53,7 @@ describe('Storage', () => {
5353 groups : [ ] ,
5454 settings : { enable_new_version_notification : false , theme : 'dim' } ,
5555 } ;
56- global . chrome . storage . local . get . mockImplementation ( ( keys , callback ) => {
56+ global . chrome . storage . sync . get . mockImplementation ( ( keys , callback ) => {
5757 callback ( { [ STORAGE_KEY ] : mockData } ) ;
5858 } ) ;
5959 const storageData = await _getStorageAsync ( ) ;
@@ -63,7 +63,7 @@ describe('Storage', () => {
6363 it ( '_clearStorage should remove storage data' , async ( ) => {
6464 await _clearStorage ( ) ;
6565
66- expect ( global . chrome . storage . local . remove ) . toHaveBeenCalledWith ( STORAGE_KEY ) ;
66+ expect ( global . chrome . storage . sync . remove ) . toHaveBeenCalledWith ( STORAGE_KEY ) ;
6767 } ) ;
6868
6969 it ( '_setStorage should set storage data' , async ( ) => {
@@ -73,7 +73,7 @@ describe('Storage', () => {
7373 settings : { enable_new_version_notification : false , theme : 'dim' } ,
7474 } ;
7575 await _setStorage ( mockData ) ;
76- expect ( global . chrome . storage . local . set ) . toHaveBeenCalledWith ( {
76+ expect ( global . chrome . storage . sync . set ) . toHaveBeenCalledWith ( {
7777 [ STORAGE_KEY ] : expect . objectContaining ( mockData ) ,
7878 } ) ;
7979 } ) ;
@@ -101,7 +101,7 @@ describe('Storage', () => {
101101 groups : [ ] ,
102102 settings : { enable_new_version_notification : false , theme : 'dim' } ,
103103 } ;
104- global . chrome . storage . local . get . mockImplementation ( ( keys , callback ) => {
104+ global . chrome . storage . sync . get . mockImplementation ( ( keys , callback ) => {
105105 callback ( { tab_modifier : mockData } ) ;
106106 } ) ;
107107 global . chrome . runtime . lastError = null ;
@@ -134,7 +134,7 @@ describe('Storage', () => {
134134 groups : [ ] ,
135135 settings : { enable_new_version_notification : false , theme : 'dim' } ,
136136 } ;
137- global . chrome . storage . local . get . mockImplementation ( ( keys , callback ) => {
137+ global . chrome . storage . sync . get . mockImplementation ( ( keys , callback ) => {
138138 callback ( { [ STORAGE_KEY ] : mockData } ) ;
139139 } ) ;
140140 global . chrome . runtime . lastError = null ;
@@ -166,7 +166,7 @@ describe('Storage', () => {
166166 groups : [ ] ,
167167 settings : { enable_new_version_notification : false , theme : 'dim' } ,
168168 } ;
169- global . chrome . storage . local . get . mockImplementation ( ( keys , callback ) => {
169+ global . chrome . storage . sync . get . mockImplementation ( ( keys , callback ) => {
170170 callback ( { [ STORAGE_KEY ] : mockData } ) ;
171171 } ) ;
172172 global . chrome . runtime . lastError = null ;
@@ -198,7 +198,7 @@ describe('Storage', () => {
198198 groups : [ ] ,
199199 settings : { enable_new_version_notification : false , theme : 'dim' } ,
200200 } ;
201- global . chrome . storage . local . get . mockImplementation ( ( keys , callback ) => {
201+ global . chrome . storage . sync . get . mockImplementation ( ( keys , callback ) => {
202202 callback ( { [ STORAGE_KEY ] : mockData } ) ;
203203 } ) ;
204204 global . chrome . runtime . lastError = null ;
@@ -230,7 +230,7 @@ describe('Storage', () => {
230230 groups : [ ] ,
231231 settings : { enable_new_version_notification : false , theme : 'dim' } ,
232232 } ;
233- global . chrome . storage . local . get . mockImplementation ( ( keys , callback ) => {
233+ global . chrome . storage . sync . get . mockImplementation ( ( keys , callback ) => {
234234 callback ( { [ STORAGE_KEY ] : mockData } ) ;
235235 } ) ;
236236 global . chrome . runtime . lastError = null ;
@@ -265,7 +265,7 @@ describe('Storage', () => {
265265 groups : [ ] ,
266266 settings : { enable_new_version_notification : false , theme : 'dim' } ,
267267 } ;
268- global . chrome . storage . local . get . mockImplementation ( ( keys , callback ) => {
268+ global . chrome . storage . sync . get . mockImplementation ( ( keys , callback ) => {
269269 callback ( { [ STORAGE_KEY ] : mockData } ) ;
270270 } ) ;
271271 global . chrome . runtime . lastError = null ;
@@ -300,7 +300,7 @@ describe('Storage', () => {
300300 groups : [ ] ,
301301 settings : { enable_new_version_notification : false , theme : 'dim' } ,
302302 } ;
303- global . chrome . storage . local . get . mockImplementation ( ( keys , callback ) => {
303+ global . chrome . storage . sync . get . mockImplementation ( ( keys , callback ) => {
304304 callback ( { [ STORAGE_KEY ] : mockData } ) ;
305305 } ) ;
306306 global . chrome . runtime . lastError = null ;
@@ -334,7 +334,7 @@ describe('Storage', () => {
334334 groups : [ ] ,
335335 settings : { enable_new_version_notification : false , theme : 'dim' } ,
336336 } ;
337- global . chrome . storage . local . get . mockImplementation ( ( keys , callback ) => {
337+ global . chrome . storage . sync . get . mockImplementation ( ( keys , callback ) => {
338338 callback ( { [ STORAGE_KEY ] : mockData } ) ;
339339 } ) ;
340340 global . chrome . runtime . lastError = null ;
@@ -367,7 +367,7 @@ describe('Storage', () => {
367367 groups : [ ] ,
368368 settings : { enable_new_version_notification : false , theme : 'dim' } ,
369369 } ;
370- global . chrome . storage . local . get . mockImplementation ( ( keys , callback ) => {
370+ global . chrome . storage . sync . get . mockImplementation ( ( keys , callback ) => {
371371 callback ( { [ STORAGE_KEY ] : mockData } ) ;
372372 } ) ;
373373 global . chrome . runtime . lastError = null ;
0 commit comments