@@ -7,7 +7,7 @@ const client = new ImageKit({
77} ) ;
88
99describe ( 'Overlay Transformation Test Cases' , function ( ) {
10- it ( 'Ignore invalid values if text is missing' , function ( ) {
10+ it ( 'should ignore text overlay when text property is missing' , function ( ) {
1111 const url = client . helper . buildSrc ( {
1212 transformationPosition : 'path' ,
1313 urlEndpoint : 'https://ik.imagekit.io/test_url_endpoint' ,
@@ -23,7 +23,7 @@ describe('Overlay Transformation Test Cases', function () {
2323 expect ( url ) . toBe ( `https://ik.imagekit.io/test_url_endpoint/base-image.jpg` ) ;
2424 } ) ;
2525
26- it ( 'Ignore if type is missing' , function ( ) {
26+ it ( 'should ignore overlay when type property is missing' , function ( ) {
2727 const url = client . helper . buildSrc ( {
2828 transformationPosition : 'path' ,
2929 urlEndpoint : 'https://ik.imagekit.io/test_url_endpoint' ,
@@ -37,7 +37,7 @@ describe('Overlay Transformation Test Cases', function () {
3737 expect ( url ) . toBe ( `https://ik.imagekit.io/test_url_endpoint/base-image.jpg` ) ;
3838 } ) ;
3939
40- it ( 'Ignore invalid values if input (image) ' , function ( ) {
40+ it ( 'should ignore image overlay when input property is missing ' , function ( ) {
4141 const url = client . helper . buildSrc ( {
4242 transformationPosition : 'path' ,
4343 urlEndpoint : 'https://ik.imagekit.io/test_url_endpoint' ,
@@ -53,7 +53,7 @@ describe('Overlay Transformation Test Cases', function () {
5353 expect ( url ) . toBe ( `https://ik.imagekit.io/test_url_endpoint/base-image.jpg` ) ;
5454 } ) ;
5555
56- it ( 'Ignore invalid values if input (video) ' , function ( ) {
56+ it ( 'should ignore video overlay when input property is missing ' , function ( ) {
5757 const url = client . helper . buildSrc ( {
5858 transformationPosition : 'path' ,
5959 urlEndpoint : 'https://ik.imagekit.io/test_url_endpoint' ,
@@ -69,7 +69,7 @@ describe('Overlay Transformation Test Cases', function () {
6969 expect ( url ) . toBe ( `https://ik.imagekit.io/test_url_endpoint/base-image.jpg` ) ;
7070 } ) ;
7171
72- it ( 'Ignore invalid values if input (subtitle) ' , function ( ) {
72+ it ( 'should ignore subtitle overlay when input property is missing ' , function ( ) {
7373 const url = client . helper . buildSrc ( {
7474 transformationPosition : 'path' ,
7575 urlEndpoint : 'https://ik.imagekit.io/test_url_endpoint' ,
@@ -85,7 +85,7 @@ describe('Overlay Transformation Test Cases', function () {
8585 expect ( url ) . toBe ( `https://ik.imagekit.io/test_url_endpoint/base-image.jpg` ) ;
8686 } ) ;
8787
88- it ( 'Ignore invalid values if color is missing (solidColor) ' , function ( ) {
88+ it ( 'should ignore solid color overlay when color property is missing' , function ( ) {
8989 const url = client . helper . buildSrc ( {
9090 transformationPosition : 'path' ,
9191 urlEndpoint : 'https://ik.imagekit.io/test_url_endpoint' ,
@@ -101,7 +101,7 @@ describe('Overlay Transformation Test Cases', function () {
101101 expect ( url ) . toBe ( `https://ik.imagekit.io/test_url_endpoint/base-image.jpg` ) ;
102102 } ) ;
103103
104- it ( 'Text overlay generates correct URL with encoded overlay text ' , function ( ) {
104+ it ( 'should generate URL with text overlay using URL encoding ' , function ( ) {
105105 const url = client . helper . buildSrc ( {
106106 transformationPosition : 'path' ,
107107 urlEndpoint : 'https://ik.imagekit.io/test_url_endpoint' ,
@@ -122,7 +122,7 @@ describe('Overlay Transformation Test Cases', function () {
122122 ) ;
123123 } ) ;
124124
125- it ( 'Image overlay generates correct URL with input logo.png ' , function ( ) {
125+ it ( 'should generate URL with image overlay from input file ' , function ( ) {
126126 const url = client . helper . buildSrc ( {
127127 transformationPosition : 'path' ,
128128 urlEndpoint : 'https://ik.imagekit.io/test_url_endpoint' ,
@@ -139,7 +139,7 @@ describe('Overlay Transformation Test Cases', function () {
139139 expect ( url ) . toBe ( `https://ik.imagekit.io/test_url_endpoint/tr:l-image,i-logo.png,l-end/base-image.jpg` ) ;
140140 } ) ;
141141
142- it ( 'Video overlay generates correct URL with input play-pause-loop.mp4 ' , function ( ) {
142+ it ( 'should generate URL with video overlay from input file ' , function ( ) {
143143 const url = client . helper . buildSrc ( {
144144 transformationPosition : 'path' ,
145145 urlEndpoint : 'https://ik.imagekit.io/test_url_endpoint' ,
@@ -158,7 +158,7 @@ describe('Overlay Transformation Test Cases', function () {
158158 ) ;
159159 } ) ;
160160
161- it ( 'Subtitle overlay generates correct URL with input subtitle.srt ' , function ( ) {
161+ it ( 'should generate URL with subtitle overlay from input file ' , function ( ) {
162162 const url = client . helper . buildSrc ( {
163163 transformationPosition : 'path' ,
164164 urlEndpoint : 'https://ik.imagekit.io/test_url_endpoint' ,
@@ -177,7 +177,7 @@ describe('Overlay Transformation Test Cases', function () {
177177 ) ;
178178 } ) ;
179179
180- it ( 'Solid color overlay generates correct URL with background color FF0000 ' , function ( ) {
180+ it ( 'should generate URL with solid color overlay using background color' , function ( ) {
181181 const url = client . helper . buildSrc ( {
182182 transformationPosition : 'path' ,
183183 urlEndpoint : 'https://ik.imagekit.io/test_url_endpoint' ,
@@ -196,7 +196,7 @@ describe('Overlay Transformation Test Cases', function () {
196196 ) ;
197197 } ) ;
198198
199- it ( 'Combined overlay transformations generate correct URL including nested overlays ' , function ( ) {
199+ it ( 'should generate URL with multiple complex overlays including nested transformations ' , function ( ) {
200200 const url = client . helper . buildSrc ( {
201201 transformationPosition : 'path' ,
202202 urlEndpoint : 'https://ik.imagekit.io/test_url_endpoint' ,
@@ -353,7 +353,7 @@ describe('Overlay Transformation Test Cases', function () {
353353} ) ;
354354
355355describe ( 'Overlay encoding test cases' , function ( ) {
356- it ( 'Nested simple path, should use i instead of ie, handle slash properly ' , function ( ) {
356+ it ( 'should use plain encoding for simple image paths with slashes converted to @@ ' , function ( ) {
357357 const url = client . helper . buildSrc ( {
358358 // Using a different endpoint here, as we are checking for /demo
359359 transformationPosition : 'path' ,
@@ -373,7 +373,7 @@ describe('Overlay encoding test cases', function () {
373373 ) ;
374374 } ) ;
375375
376- it ( 'Nested non-simple path, should use ie instead of i ' , function ( ) {
376+ it ( 'should use base64 encoding for image paths containing special characters ' , function ( ) {
377377 const url = client . helper . buildSrc ( {
378378 transformationPosition : 'path' ,
379379 urlEndpoint : 'https://ik.imagekit.io/demo' ,
@@ -396,7 +396,7 @@ describe('Overlay encoding test cases', function () {
396396 ) ;
397397 } ) ;
398398
399- it ( 'Simple text overlay, should use i instead of ie ' , function ( ) {
399+ it ( 'should use plain encoding for simple text overlays ' , function ( ) {
400400 const url = client . helper . buildSrc ( {
401401 transformationPosition : 'path' ,
402402 urlEndpoint : 'https://ik.imagekit.io/demo' ,
@@ -413,7 +413,7 @@ describe('Overlay encoding test cases', function () {
413413 expect ( url ) . toBe ( `https://ik.imagekit.io/demo/tr:l-text,i-Manu,l-end/medium_cafe_B1iTdD0C.jpg` ) ;
414414 } ) ;
415415
416- it ( 'Handle slash in fontFamily in case of custom fonts' , function ( ) {
416+ it ( 'should convert slashes to @@ in fontFamily paths for custom fonts' , function ( ) {
417417 const url = client . helper . buildSrc ( {
418418 transformationPosition : 'path' ,
419419 urlEndpoint : 'https://ik.imagekit.io/demo' ,
@@ -437,7 +437,7 @@ describe('Overlay encoding test cases', function () {
437437 ) ;
438438 } ) ;
439439
440- it ( 'Simple text overlay with spaces and other safe characters, should use i instead of ie ' , function ( ) {
440+ it ( 'should use URL encoding for text overlays with spaces and safe characters' , function ( ) {
441441 const url = client . helper . buildSrc ( {
442442 transformationPosition : 'path' ,
443443 urlEndpoint : 'https://ik.imagekit.io/demo' ,
@@ -458,7 +458,7 @@ describe('Overlay encoding test cases', function () {
458458 ) ;
459459 } ) ;
460460
461- it ( 'Non simple text overlay, should use ie instead of i ' , function ( ) {
461+ it ( 'should use base64 encoding for text overlays with special unicode characters ' , function ( ) {
462462 const url = client . helper . buildSrc ( {
463463 transformationPosition : 'path' ,
464464 urlEndpoint : 'https://ik.imagekit.io/demo' ,
@@ -477,7 +477,7 @@ describe('Overlay encoding test cases', function () {
477477 ) ;
478478 } ) ;
479479
480- it ( 'Text overlay with explicit plain encoding' , function ( ) {
480+ it ( 'should use plain encoding when explicitly specified for text overlay ' , function ( ) {
481481 const url = client . helper . buildSrc ( {
482482 transformationPosition : 'path' ,
483483 urlEndpoint : 'https://ik.imagekit.io/demo' ,
@@ -495,7 +495,7 @@ describe('Overlay encoding test cases', function () {
495495 expect ( url ) . toBe ( `https://ik.imagekit.io/demo/tr:l-text,i-HelloWorld,l-end/sample.jpg` ) ;
496496 } ) ;
497497
498- it ( 'Text overlay with explicit base64 encoding' , function ( ) {
498+ it ( 'should use base64 encoding when explicitly specified for text overlay ' , function ( ) {
499499 const url = client . helper . buildSrc ( {
500500 transformationPosition : 'path' ,
501501 urlEndpoint : 'https://ik.imagekit.io/demo' ,
@@ -517,7 +517,7 @@ describe('Overlay encoding test cases', function () {
517517 ) ;
518518 } ) ;
519519
520- it ( 'Image overlay with explicit plain encoding' , function ( ) {
520+ it ( 'should use plain encoding when explicitly specified for image overlay ' , function ( ) {
521521 const url = client . helper . buildSrc ( {
522522 transformationPosition : 'path' ,
523523 urlEndpoint : 'https://ik.imagekit.io/demo' ,
@@ -535,7 +535,7 @@ describe('Overlay encoding test cases', function () {
535535 expect ( url ) . toBe ( `https://ik.imagekit.io/demo/tr:l-image,i-customer@@logo.png,l-end/sample.jpg` ) ;
536536 } ) ;
537537
538- it ( 'Image overlay with explicit base64 encoding' , function ( ) {
538+ it ( 'should use base64 encoding when explicitly specified for image overlay ' , function ( ) {
539539 const url = client . helper . buildSrc ( {
540540 transformationPosition : 'path' ,
541541 urlEndpoint : 'https://ik.imagekit.io/demo' ,
@@ -557,7 +557,7 @@ describe('Overlay encoding test cases', function () {
557557 ) ;
558558 } ) ;
559559
560- it ( 'Video overlay with explicit base64 encoding' , function ( ) {
560+ it ( 'should use base64 encoding when explicitly specified for video overlay ' , function ( ) {
561561 const url = client . helper . buildSrc ( {
562562 transformationPosition : 'path' ,
563563 urlEndpoint : 'https://ik.imagekit.io/demo' ,
@@ -579,7 +579,7 @@ describe('Overlay encoding test cases', function () {
579579 ) ;
580580 } ) ;
581581
582- it ( 'Subtitle overlay with explicit plain encoding' , function ( ) {
582+ it ( 'should use plain encoding when explicitly specified for subtitle overlay ' , function ( ) {
583583 const url = client . helper . buildSrc ( {
584584 transformationPosition : 'path' ,
585585 urlEndpoint : 'https://ik.imagekit.io/demo' ,
@@ -597,7 +597,7 @@ describe('Overlay encoding test cases', function () {
597597 expect ( url ) . toBe ( `https://ik.imagekit.io/demo/tr:l-subtitle,i-sub.srt,l-end/sample.mp4` ) ;
598598 } ) ;
599599
600- it ( 'Subtitle overlay with explicit base64 encoding' , function ( ) {
600+ it ( 'should use base64 encoding when explicitly specified for subtitle overlay ' , function ( ) {
601601 const url = client . helper . buildSrc ( {
602602 transformationPosition : 'path' ,
603603 urlEndpoint : 'https://ik.imagekit.io/demo' ,
@@ -619,7 +619,7 @@ describe('Overlay encoding test cases', function () {
619619 ) ;
620620 } ) ;
621621
622- it ( 'Avoid double encoding when transformation string is in query params ' , function ( ) {
622+ it ( 'should properly encode overlay text when transformations are in query parameters ' , function ( ) {
623623 const url = client . helper . buildSrc ( {
624624 urlEndpoint : 'https://ik.imagekit.io/demo' ,
625625 src : '/sample.jpg' ,
0 commit comments