@@ -67,7 +67,7 @@ describe('uploadcareLoader', () => {
67
67
68
68
const t = ( ) => {
69
69
uploadcareLoader ( {
70
- src : '' ,
70
+ src : 'https://example.com ' ,
71
71
width : 0 ,
72
72
quality : 80
73
73
} ) ;
@@ -95,7 +95,7 @@ describe('uploadcareLoader', () => {
95
95
} ) ;
96
96
97
97
test ( 'The loader parses user paramters properly' , ( ) => {
98
- const src = 'https:/example.com/image.jpg' ;
98
+ const src = 'https:// example.com/image.jpg' ;
99
99
100
100
addEnvVar ( 'NEXT_PUBLIC_UPLOADCARE_PUBLIC_KEY' , 'test-public-key' ) ;
101
101
@@ -108,7 +108,7 @@ describe('uploadcareLoader', () => {
108
108
} ) ;
109
109
110
110
expect ( result ) . toBe (
111
- 'https://test-public-key.ucr.io/-/format/auto/-/stretch/off/-/progressive/yes/-/resize/500x/-/quality/normal/https:/example.com/image.jpg'
111
+ 'https://test-public-key.ucr.io/-/format/auto/-/stretch/off/-/progressive/yes/-/resize/500x/-/quality/normal/https:// example.com/image.jpg'
112
112
) ;
113
113
114
114
// Override default params, including resize and quality.
@@ -125,7 +125,7 @@ describe('uploadcareLoader', () => {
125
125
} ) ;
126
126
127
127
expect ( result ) . toBe (
128
- 'https://test-public-key.ucr.io/-/format/jpg/-/stretch/on/-/progressive/no/-/resize/1x/-/quality/smart_retina/https:/example.com/image.jpg'
128
+ 'https://test-public-key.ucr.io/-/format/jpg/-/stretch/on/-/progressive/no/-/resize/1x/-/quality/smart_retina/https:// example.com/image.jpg'
129
129
) ;
130
130
131
131
// Add a new parameter (no defaults).
@@ -142,15 +142,15 @@ describe('uploadcareLoader', () => {
142
142
} ) ;
143
143
144
144
expect ( result ) . toBe (
145
- 'https://test-public-key.ucr.io/-/format/auto/-/stretch/off/-/progressive/yes/-/resize/500x/-/quality/normal/-/new/parameter/https:/example.com/image.jpg'
145
+ 'https://test-public-key.ucr.io/-/format/auto/-/stretch/off/-/progressive/yes/-/resize/500x/-/quality/normal/-/new/parameter/https:// example.com/image.jpg'
146
146
) ;
147
147
148
148
removeEnvVar ( 'NEXT_PUBLIC_UPLOADCARE_PUBLIC_KEY' ) ;
149
149
removeEnvVar ( 'NEXT_PUBLIC_UPLOADCARE_TRANSFORMATION_PARAMETERS' ) ;
150
150
} ) ;
151
151
152
152
test ( "The loader doesn't process SVG and GIF (absolute url)" , ( ) => {
153
- const src = 'https:/example.com/image.svg' ;
153
+ const src = 'https:// example.com/image.svg' ;
154
154
155
155
addEnvVar ( 'NEXT_PUBLIC_UPLOADCARE_PUBLIC_KEY' , 'test-public-key' ) ;
156
156
@@ -242,7 +242,7 @@ describe('uploadcareLoader', () => {
242
242
243
243
// Not a jpg image. Should be max 3000 width.
244
244
245
- let src = 'https:/example.com/image.png' ;
245
+ let src = 'https:// example.com/image.png' ;
246
246
247
247
addEnvVar (
248
248
'NEXT_PUBLIC_UPLOADCARE_TRANSFORMATION_PARAMETERS' ,
@@ -256,7 +256,7 @@ describe('uploadcareLoader', () => {
256
256
} ) ;
257
257
258
258
expect ( result ) . toBe (
259
- 'https://test-public-key.ucr.io/-/format/auto/-/stretch/off/-/progressive/yes/-/resize/3000x/-/quality/normal/https:/example.com/image.png'
259
+ 'https://test-public-key.ucr.io/-/format/auto/-/stretch/off/-/progressive/yes/-/resize/3000x/-/quality/normal/https:// example.com/image.png'
260
260
) ;
261
261
262
262
// Jpg image by format. Should be max 5000 width.
@@ -273,13 +273,13 @@ describe('uploadcareLoader', () => {
273
273
} ) ;
274
274
275
275
expect ( result ) . toBe (
276
- 'https://test-public-key.ucr.io/-/format/jpeg/-/stretch/off/-/progressive/yes/-/resize/5000x/-/quality/normal/https:/example.com/image.png'
276
+ 'https://test-public-key.ucr.io/-/format/jpeg/-/stretch/off/-/progressive/yes/-/resize/5000x/-/quality/normal/https:// example.com/image.png'
277
277
) ;
278
278
279
279
// // Jpg image by extension with auto format.
280
280
// // Should be max 5000 width with /format/jpeg/ forced.
281
281
282
- src = 'https:/example.com/image.jpg' ;
282
+ src = 'https:// example.com/image.jpg' ;
283
283
284
284
addEnvVar (
285
285
'NEXT_PUBLIC_UPLOADCARE_TRANSFORMATION_PARAMETERS' ,
@@ -293,7 +293,7 @@ describe('uploadcareLoader', () => {
293
293
} ) ;
294
294
295
295
expect ( result ) . toBe (
296
- 'https://test-public-key.ucr.io/-/format/jpeg/-/stretch/off/-/progressive/yes/-/resize/5000x/-/quality/normal/https:/example.com/image.jpg'
296
+ 'https://test-public-key.ucr.io/-/format/jpeg/-/stretch/off/-/progressive/yes/-/resize/5000x/-/quality/normal/https:// example.com/image.jpg'
297
297
) ;
298
298
299
299
removeEnvVar ( 'NEXT_PUBLIC_UPLOADCARE_PUBLIC_KEY' ) ;
0 commit comments