@@ -3,26 +3,26 @@ import imageHelpers from '../src/image-helpers';
3
3
4
4
suite ( 'image-helpers-test' , ( ) => {
5
5
test ( 'it returns the image src with the specified width and height' , ( ) => {
6
- const resizedImageSrc = imageHelpers . imageForSize ( { src : 'https://cdn.shopify.com/s/files/1/1510/7238 /products/cat .jpg?v=1489515038 ' } , { maxWidth : 30 , maxHeight : 30 } ) ;
6
+ const resizedImageSrc = imageHelpers . imageForSize ( { src : 'https://cdn.shopify.com/s/files/1/1019/0495 /products/babyandco5 .jpg?v=1487171332 ' } , { maxWidth : 280 , maxHeight : 560 } ) ;
7
7
8
- assert . equal ( resizedImageSrc , 'https://cdn.shopify.com/s/files/1/1510/7238 /products/cat_30x30 .jpg?v=1489515038 ' ) ;
8
+ assert . equal ( resizedImageSrc , 'https://cdn.shopify.com/s/files/1/1019/0495 /products/babyandco5_280x560 .jpg?v=1487171332 ' ) ;
9
9
} ) ;
10
10
11
11
test ( 'it returns the correct url for an image without any url params' , ( ) => {
12
- const resizedImageSrc = imageHelpers . imageForSize ( { src : 'https://cdn.shopify.com/s/files/1/1510/7238 /products/cat .jpg' } , { maxWidth : 30 , maxHeight : 30 } ) ;
12
+ const resizedImageSrc = imageHelpers . imageForSize ( { src : 'https://cdn.shopify.com/s/files/1/1019/0495 /products/babyandco5 .jpg' } , { maxWidth : 280 , maxHeight : 560 } ) ;
13
13
14
- assert . equal ( resizedImageSrc , 'https://cdn.shopify.com/s/files/1/1510/7238 /products/cat_30x30 .jpg' ) ;
14
+ assert . equal ( resizedImageSrc , 'https://cdn.shopify.com/s/files/1/1019/0495 /products/babyandco5_280x560 .jpg' ) ;
15
15
} ) ;
16
16
17
17
test ( 'it returns the correct url for filenames with .' , ( ) => {
18
- const resizedImageSrc = imageHelpers . imageForSize ( { src : 'https://cdn.shopify.com/s/files/1/1510/7238 /products/cat.really.big. jpg?v=1489515038 ' } , { maxWidth : 30 , maxHeight : 30 } ) ;
18
+ const resizedImageSrc = imageHelpers . imageForSize ( { src : 'https://cdn.shopify.com/s/files/1/1019/0495 /products/Ashley.34.51031.test. jpg?v=1505141764 ' } , { maxWidth : 280 , maxHeight : 560 } ) ;
19
19
20
- assert . equal ( resizedImageSrc , 'https://cdn.shopify.com/s/files/1/1510/7238 /products/cat.really.big_30x30. jpg?v=1489515038 ' ) ;
20
+ assert . equal ( resizedImageSrc , 'https://cdn.shopify.com/s/files/1/1019/0495 /products/Ashley.34.51031.test_280x560. jpg?v=1505141764 ' ) ;
21
21
} ) ;
22
22
23
23
test ( 'it returns the correct url for an image src with . in the query param' , ( ) => {
24
- const resizedImageSrc = imageHelpers . imageForSize ( { src : 'https://cdn.shopify.com/s/files/1/1510/7238 /products/cat .jpg?v=1.489.51.5038 ' } , { maxWidth : 30 , maxHeight : 30 } ) ;
24
+ const resizedImageSrc = imageHelpers . imageForSize ( { src : 'https://cdn.shopify.com/s/files/1/1019/0495 /products/babyandco5 .jpg?v=148.71713.32 ' } , { maxWidth : 280 , maxHeight : 560 } ) ;
25
25
26
- assert . equal ( resizedImageSrc , 'https://cdn.shopify.com/s/files/1/1510/7238 /products/cat_30x30 .jpg?v=1.489.51.5038 ' ) ;
26
+ assert . equal ( resizedImageSrc , 'https://cdn.shopify.com/s/files/1/1019/0495 /products/babyandco5_280x560 .jpg?v=148.71713.32 ' ) ;
27
27
} ) ;
28
28
} ) ;
0 commit comments