@@ -122,27 +122,28 @@ describe("string tests", () => {
122122 } ) ;
123123
124124 test . each ( [
125- [ "" , " " , "" ] ,
126- [ "" , "" , "" ] ,
127- [ "hello world" , "" , "hello world" ] ,
125+ [ null as unknown as string , " " , null as unknown as string ] ,
126+ [ undefined as unknown as string , " " , undefined as unknown as string ] ,
127+ [ "hello world" , "hello world" , "" ] ,
128+ [ "hello world" , " " , "hello world" ] ,
128129 [ " hello world" , " " , "hello world" ] ,
129130 ] ) ( "left trim" , ( haystack , needle , expected ) => {
130131 expect ( ltrim ( haystack , needle ) ) . toBe ( expected ) ;
131132 } ) ;
132133
133134 test . each ( [
134- [ "" , " " , "" ] ,
135- [ "" , "" , "" ] ,
135+ [ null as unknown as string , " " , null as unknown as string ] ,
136+ [ undefined as unknown as string , " " , undefined as unknown as string ] ,
136137 [ "hello world" , "hello world" , "" ] ,
137- [ "hello world" , "" , "hello world" ] ,
138138 [ "hello world " , " " , "hello world" ] ,
139+ [ "hello world" , " " , "hello world" ] ,
139140 ] ) ( "right trim" , ( haystack , needle , expected ) => {
140141 expect ( rtrim ( haystack , needle ) ) . toBe ( expected ) ;
141142 } ) ;
142143
143144 test . each ( [
144- [ "" , " " , "" ] ,
145- [ "" , "" , "" ] ,
145+ [ null as unknown as string , " " , null as unknown as string ] ,
146+ [ undefined as unknown as string , " " , undefined as unknown as string ] ,
146147 [ "hello world" , "" , "hello world" ] ,
147148 [ " hello world " , " " , "hello world" ] ,
148149 ] ) ( "trim" , ( haystack , needle , expected ) => {
0 commit comments