@@ -14,10 +14,30 @@ describe('fromJson', () => {
1414 { actionType : 'thumbnail' , dimensions : { width : 100 } , relative : true , gravity : 'south' , zoom : 4 } ,
1515 { actionType : 'pad' , dimensions : { width : 100 } , relative : true , gravity : 'south' , x : 3 , y :4 , background : 'white' } ,
1616 { actionType : 'limitPad' , dimensions : { width : 100 } , relative : true , gravity : 'south' , x : 3 , y :4 , background : 'white' } ,
17- { actionType : 'minimumPad' , dimensions : { width : 100 } , relative : true , gravity : 'south' , x : 3 , y :4 , background : 'white' }
17+ { actionType : 'minimumPad' , dimensions : { width : 100 } , relative : true , gravity : 'south' , x : 3 , y :4 , background : 'white' } ,
1818 ] ) ;
1919
20- expect ( transformation . toString ( ) ) . toStrictEqual ( 'ar_7.0,c_scale,w_100/ar_16:9,c_fit,fl_relative,h_200/c_limit,fl_ignore_aspect_ratio,fl_relative,h_200/c_mfit,fl_region_relative,w_100/c_crop,fl_region_relative,g_north_east,w_100,y_3,z_7/c_fill,fl_relative,g_south,w_100,x_4,y_5/c_lfill,fl_relative,g_south,w_100,x_4,y_5/c_thumb,fl_relative,g_south,w_100,z_4/b_white,c_pad,fl_relative,g_south,w_100,x_3,y_4/b_white,c_lpad,fl_relative,g_south,w_100,x_3,y_4/b_white,c_mpad,fl_relative,g_south,w_100,x_3,y_4' ) ;
20+ expect ( transformation . toString ( ) ) . toStrictEqual ( [
21+ 'ar_7.0,c_scale,w_100' ,
22+ 'ar_16:9,c_fit,fl_relative,h_200' ,
23+ 'c_limit,fl_ignore_aspect_ratio,fl_relative,h_200' ,
24+ 'c_mfit,fl_region_relative,w_100' ,
25+ 'c_crop,fl_region_relative,g_north_east,w_100,y_3,z_7' ,
26+ 'c_fill,fl_relative,g_south,w_100,x_4,y_5' ,
27+ 'c_lfill,fl_relative,g_south,w_100,x_4,y_5' ,
28+ 'c_thumb,fl_relative,g_south,w_100,z_4' ,
29+ 'b_white,c_pad,fl_relative,g_south,w_100,x_3,y_4' ,
30+ 'b_white,c_lpad,fl_relative,g_south,w_100,x_3,y_4' ,
31+ 'b_white,c_mpad,fl_relative,g_south,w_100,x_3,y_4' ,
32+ ] . join ( '/' ) ) ;
33+ } ) ;
34+
35+ it ( 'should generate a transformation string from colorSpace action' , function ( ) {
36+ const transformation = fromJson ( [
37+ { actionType : 'colorSpace' , mode : 'srgbTrueColor' }
38+ ] ) ;
39+
40+ expect ( transformation . toString ( ) ) . toStrictEqual ( 'cs_srgb:truecolor' ) ;
2141 } ) ;
2242
2343 it ( 'should generate an error for array that includes an unsupported action' , function ( ) {
0 commit comments