@@ -201,14 +201,20 @@ test("noConflict", function() {
201201} ) ;
202202
203203test ( "trim" , function ( ) {
204- expect ( 4 ) ;
204+ expect ( 9 ) ;
205205
206- var nbsp = String . fromCharCode ( 160 ) ;
206+ var nbsp = String . fromCharCode ( 160 ) ;
207207
208- equals ( jQuery . trim ( "hello " ) , "hello" , "trailing space" ) ;
209- equals ( jQuery . trim ( " hello" ) , "hello" , "leading space" ) ;
210- equals ( jQuery . trim ( " hello " ) , "hello" , "space on both sides" ) ;
211- equals ( jQuery . trim ( " " + nbsp + "hello " + nbsp + " " ) , "hello" , " " ) ;
208+ equals ( jQuery . trim ( "hello " ) , "hello" , "trailing space" ) ;
209+ equals ( jQuery . trim ( " hello" ) , "hello" , "leading space" ) ;
210+ equals ( jQuery . trim ( " hello " ) , "hello" , "space on both sides" ) ;
211+ equals ( jQuery . trim ( " " + nbsp + "hello " + nbsp + " " ) , "hello" , " " ) ;
212+
213+ equals ( jQuery . trim ( ) , "" , "Nothing in." ) ;
214+ equals ( jQuery . trim ( undefined ) , "" , "Undefined" ) ;
215+ equals ( jQuery . trim ( null ) , "" , "Null" ) ;
216+ equals ( jQuery . trim ( 5 ) , "5" , "Number" ) ;
217+ equals ( jQuery . trim ( false ) , "false" , "Boolean" ) ;
212218} ) ;
213219
214220test ( "isPlainObject" , function ( ) {
0 commit comments