File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change 1+ const { buildTransformationString } = require ( "../../src/index" ) ;
2+ const { expect } = require ( 'chai' ) ;
3+
4+ describe ( 'buildTransformationString' , function ( ) {
5+ it ( 'should return an empty string when no transformations are provided' , function ( ) {
6+ const result = buildTransformationString ( [ { } ] ) ;
7+ expect ( result ) . to . equal ( '' ) ;
8+ } ) ;
9+
10+ it ( 'should generate a transformation string for width only' , function ( ) {
11+ const result = buildTransformationString ( [ { width : 300 } ] ) ;
12+ expect ( result ) . to . equal ( 'w-300' ) ;
13+ } ) ;
14+
15+ it ( 'should generate a transformation string for multiple transformations' , function ( ) {
16+ const result = buildTransformationString ( [
17+ {
18+ overlay : {
19+ type : 'text' ,
20+ text : 'Hello' ,
21+ }
22+ }
23+ ] ) ;
24+ expect ( result ) . to . equal ( 'l-text,i-Hello,l-end' ) ;
25+ } ) ;
26+ } ) ;
You can’t perform that action at this time.
0 commit comments