@@ -90,6 +90,72 @@ describe('delivery.fromJson', () => {
90
90
expect ( transformation . toString ( ) ) . toStrictEqual ( 'q_auto:best' ) ;
91
91
} ) ;
92
92
93
+ it ( 'quality:auto:eco' , ( ) => {
94
+ const transformation = fromJson ( [
95
+ {
96
+ actionType : 'quality' ,
97
+ level : 'autoEco'
98
+ }
99
+ ] ) ;
100
+
101
+ expect ( transformation . toString ( ) ) . toStrictEqual ( 'q_auto:eco' ) ;
102
+ } ) ;
103
+
104
+ it ( 'quality:auto:good' , ( ) => {
105
+ const transformation = fromJson ( [
106
+ {
107
+ actionType : 'quality' ,
108
+ level : 'autoGood'
109
+ }
110
+ ] ) ;
111
+
112
+ expect ( transformation . toString ( ) ) . toStrictEqual ( 'q_auto:good' ) ;
113
+ } ) ;
114
+
115
+ it ( 'quality:auto:low' , ( ) => {
116
+ const transformation = fromJson ( [
117
+ {
118
+ actionType : 'quality' ,
119
+ level : 'autoLow'
120
+ }
121
+ ] ) ;
122
+
123
+ expect ( transformation . toString ( ) ) . toStrictEqual ( 'q_auto:low' ) ;
124
+ } ) ;
125
+
126
+ it ( 'quality:jpegminiHigh' , ( ) => {
127
+ const transformation = fromJson ( [
128
+ {
129
+ actionType : 'quality' ,
130
+ level : 'jpegminiHigh'
131
+ }
132
+ ] ) ;
133
+
134
+ expect ( transformation . toString ( ) ) . toStrictEqual ( 'q_jpegmini:1' ) ;
135
+ } ) ;
136
+
137
+ it ( 'quality:jpegminiMedium' , ( ) => {
138
+ const transformation = fromJson ( [
139
+ {
140
+ actionType : 'quality' ,
141
+ level : 'jpegminiMedium'
142
+ }
143
+ ] ) ;
144
+
145
+ expect ( transformation . toString ( ) ) . toStrictEqual ( 'q_jpegmini:2' ) ;
146
+ } ) ;
147
+
148
+ it ( 'quality:jpegminiBest' , ( ) => {
149
+ const transformation = fromJson ( [
150
+ {
151
+ actionType : 'quality' ,
152
+ level : 'jpegminiBest'
153
+ }
154
+ ] ) ;
155
+
156
+ expect ( transformation . toString ( ) ) . toStrictEqual ( 'q_jpegmini:0' ) ;
157
+ } ) ;
158
+
93
159
it ( 'chromaSubSampling' , ( ) => {
94
160
const transformation = fromJson ( [
95
161
{
0 commit comments