@@ -72,7 +72,7 @@ describe('get', () => {
72
72
url : signedURL ,
73
73
} )
74
74
75
- globalThis . fetch = mockStore . fetcher
75
+ globalThis . fetch = mockStore . fetch
76
76
77
77
const blobs = getStore ( {
78
78
name : 'production' ,
@@ -104,7 +104,7 @@ describe('get', () => {
104
104
url : signedURL ,
105
105
} )
106
106
107
- globalThis . fetch = mockStore . fetcher
107
+ globalThis . fetch = mockStore . fetch
108
108
109
109
const blobs = getStore ( {
110
110
name : 'production' ,
@@ -123,7 +123,7 @@ describe('get', () => {
123
123
url : `https://api.netlify.com/api/v1/sites/${ siteID } /blobs/${ key } ?context=production` ,
124
124
} )
125
125
126
- globalThis . fetch = mockStore . fetcher
126
+ globalThis . fetch = mockStore . fetch
127
127
128
128
const blobs = getStore ( {
129
129
name : 'production' ,
@@ -149,7 +149,7 @@ describe('get', () => {
149
149
url : signedURL ,
150
150
} )
151
151
152
- globalThis . fetch = mockStore . fetcher
152
+ globalThis . fetch = mockStore . fetch
153
153
154
154
const blobs = getStore ( {
155
155
name : 'production' ,
@@ -180,7 +180,7 @@ describe('get', () => {
180
180
url : signedURL ,
181
181
} )
182
182
183
- globalThis . fetch = mockStore . fetcher
183
+ globalThis . fetch = mockStore . fetch
184
184
185
185
const blobs = getStore ( {
186
186
name : 'production' ,
@@ -207,7 +207,7 @@ describe('get', () => {
207
207
url : `${ edgeURL } /${ siteID } /production/${ key } ` ,
208
208
} )
209
209
210
- globalThis . fetch = mockStore . fetcher
210
+ globalThis . fetch = mockStore . fetch
211
211
212
212
const blobs = getStore ( {
213
213
edgeURL,
@@ -232,7 +232,7 @@ describe('get', () => {
232
232
url : `${ edgeURL } /${ siteID } /production/${ key } ` ,
233
233
} )
234
234
235
- globalThis . fetch = mockStore . fetcher
235
+ globalThis . fetch = mockStore . fetch
236
236
237
237
const blobs = getStore ( {
238
238
edgeURL,
@@ -252,7 +252,7 @@ describe('get', () => {
252
252
url : `${ edgeURL } /${ siteID } /production/${ key } ` ,
253
253
} )
254
254
255
- globalThis . fetch = mockStore . fetcher
255
+ globalThis . fetch = mockStore . fetch
256
256
257
257
const blobs = getStore ( {
258
258
edgeURL,
@@ -292,7 +292,7 @@ describe('get', () => {
292
292
url : `${ edgeURL } /${ siteID } /images/${ key } ` ,
293
293
} )
294
294
295
- globalThis . fetch = mockStore . fetcher
295
+ globalThis . fetch = mockStore . fetch
296
296
297
297
for ( let index = 0 ; index <= 1 ; index ++ ) {
298
298
const context = {
@@ -317,9 +317,9 @@ describe('get', () => {
317
317
} )
318
318
319
319
test ( 'Throws when the instance is missing required configuration properties' , async ( ) => {
320
- const { fetcher } = new MockFetch ( )
320
+ const { fetch } = new MockFetch ( )
321
321
322
- globalThis . fetch = fetcher
322
+ globalThis . fetch = fetch
323
323
324
324
const blobs1 = getStore ( 'production' )
325
325
@@ -368,7 +368,7 @@ describe('set', () => {
368
368
url : signedURL ,
369
369
} )
370
370
371
- globalThis . fetch = mockStore . fetcher
371
+ globalThis . fetch = mockStore . fetch
372
372
373
373
const blobs = getStore ( {
374
374
name : 'production' ,
@@ -400,7 +400,7 @@ describe('set', () => {
400
400
url : signedURL ,
401
401
} )
402
402
403
- globalThis . fetch = mockStore . fetcher
403
+ globalThis . fetch = mockStore . fetch
404
404
405
405
const blobs = getStore ( {
406
406
name : 'production' ,
@@ -420,7 +420,7 @@ describe('set', () => {
420
420
url : `https://api.netlify.com/api/v1/sites/${ siteID } /blobs/${ key } ?context=production` ,
421
421
} )
422
422
423
- globalThis . fetch = mockStore . fetcher
423
+ globalThis . fetch = mockStore . fetch
424
424
425
425
const blobs = getStore ( {
426
426
name : 'production' ,
@@ -474,7 +474,7 @@ describe('set', () => {
474
474
url : signedURL ,
475
475
} )
476
476
477
- globalThis . fetch = mockStore . fetcher
477
+ globalThis . fetch = mockStore . fetch
478
478
479
479
const blobs = getStore ( {
480
480
name : 'production' ,
@@ -504,7 +504,7 @@ describe('set', () => {
504
504
url : `${ edgeURL } /${ siteID } /production/${ encodeURIComponent ( complexKey ) } ` ,
505
505
} )
506
506
507
- globalThis . fetch = mockStore . fetcher
507
+ globalThis . fetch = mockStore . fetch
508
508
509
509
const blobs = getStore ( {
510
510
edgeURL,
@@ -527,7 +527,7 @@ describe('set', () => {
527
527
url : `${ edgeURL } /${ siteID } /production/${ key } ` ,
528
528
} )
529
529
530
- globalThis . fetch = mockStore . fetcher
530
+ globalThis . fetch = mockStore . fetch
531
531
532
532
const blobs = getStore ( {
533
533
edgeURL,
@@ -570,7 +570,7 @@ describe('set', () => {
570
570
url : `${ edgeURL } /${ siteID } /production/${ key } ` ,
571
571
} )
572
572
573
- globalThis . fetch = mockStore . fetcher
573
+ globalThis . fetch = mockStore . fetch
574
574
575
575
const blobs = getStore ( {
576
576
edgeURL,
@@ -586,9 +586,9 @@ describe('set', () => {
586
586
} )
587
587
588
588
test ( 'Throws when the instance is missing required configuration properties' , async ( ) => {
589
- const { fetcher } = new MockFetch ( )
589
+ const { fetch } = new MockFetch ( )
590
590
591
- globalThis . fetch = fetcher
591
+ globalThis . fetch = fetch
592
592
593
593
const blobs1 = getStore ( 'production' )
594
594
@@ -626,7 +626,7 @@ describe('setJSON', () => {
626
626
url : signedURL ,
627
627
} )
628
628
629
- globalThis . fetch = mockStore . fetcher
629
+ globalThis . fetch = mockStore . fetch
630
630
631
631
const blobs = getStore ( {
632
632
name : 'production' ,
@@ -649,7 +649,7 @@ describe('setJSON', () => {
649
649
url : `${ edgeURL } /${ siteID } /production/${ key } ` ,
650
650
} )
651
651
652
- globalThis . fetch = mockStore . fetcher
652
+ globalThis . fetch = mockStore . fetch
653
653
654
654
const blobs = getStore ( {
655
655
edgeURL,
@@ -681,7 +681,7 @@ describe('setJSON', () => {
681
681
url : signedURL ,
682
682
} )
683
683
684
- globalThis . fetch = mockStore . fetcher
684
+ globalThis . fetch = mockStore . fetch
685
685
686
686
const blobs = getStore ( {
687
687
name : 'production' ,
@@ -721,7 +721,7 @@ describe('delete', () => {
721
721
url : signedURL ,
722
722
} )
723
723
724
- globalThis . fetch = mockStore . fetcher
724
+ globalThis . fetch = mockStore . fetch
725
725
726
726
const blobs = getStore ( {
727
727
name : 'production' ,
@@ -742,7 +742,7 @@ describe('delete', () => {
742
742
url : `https://api.netlify.com/api/v1/sites/${ siteID } /blobs/${ key } ?context=production` ,
743
743
} )
744
744
745
- globalThis . fetch = mockStore . fetcher
745
+ globalThis . fetch = mockStore . fetch
746
746
747
747
const blobs = getStore ( {
748
748
name : 'production' ,
@@ -765,7 +765,7 @@ describe('delete', () => {
765
765
url : `${ edgeURL } /${ siteID } /production/${ key } ` ,
766
766
} )
767
767
768
- globalThis . fetch = mockStore . fetcher
768
+ globalThis . fetch = mockStore . fetch
769
769
770
770
const blobs = getStore ( {
771
771
edgeURL,
@@ -786,7 +786,7 @@ describe('delete', () => {
786
786
url : `${ edgeURL } /${ siteID } /production/${ key } ` ,
787
787
} )
788
788
789
- globalThis . fetch = mockStore . fetcher
789
+ globalThis . fetch = mockStore . fetch
790
790
791
791
const blobs = getStore ( {
792
792
edgeURL,
@@ -804,9 +804,9 @@ describe('delete', () => {
804
804
} )
805
805
806
806
test ( 'Throws when the instance is missing required configuration properties' , async ( ) => {
807
- const { fetcher } = new MockFetch ( )
807
+ const { fetch } = new MockFetch ( )
808
808
809
- globalThis . fetch = fetcher
809
+ globalThis . fetch = fetch
810
810
811
811
const blobs1 = getStore ( 'production' )
812
812
@@ -851,7 +851,7 @@ describe('Deploy scope', () => {
851
851
url : `${ edgeURL } /${ siteID } /${ deployID } /${ key } ` ,
852
852
} )
853
853
854
- globalThis . fetch = mockStore . fetcher
854
+ globalThis . fetch = mockStore . fetch
855
855
856
856
const context = {
857
857
edgeURL,
@@ -881,8 +881,8 @@ describe('Deploy scope', () => {
881
881
} )
882
882
} )
883
883
884
- describe ( 'Customer fetcher ' , ( ) => {
885
- test ( 'Uses a custom implementation of `fetch` if the `fetcher ` parameter is supplied' , async ( ) => {
884
+ describe ( 'Custom `fetch` ' , ( ) => {
885
+ test ( 'Uses a custom implementation of `fetch` if the `fetch ` parameter is supplied' , async ( ) => {
886
886
globalThis . fetch = ( ) => {
887
887
throw new Error ( 'I should not be called' )
888
888
}
@@ -901,7 +901,7 @@ describe('Customer fetcher', () => {
901
901
902
902
env . NETLIFY_BLOBS_CONTEXT = Buffer . from ( JSON . stringify ( context ) ) . toString ( 'base64' )
903
903
904
- const store = getStore ( { fetcher : mockStore . fetcher , name : 'images' } )
904
+ const store = getStore ( { fetch : mockStore . fetch , name : 'images' } )
905
905
906
906
const string = await store . get ( key )
907
907
expect ( string ) . toBe ( value )
0 commit comments