mirror of
https://github.com/jquery/jquery.git
synced 2026-04-20 03:01:22 -04:00
Fixes $.trim for closes #4980
This commit is contained in:
@@ -189,6 +189,17 @@ test("noConflict", function() {
|
||||
jQuery = $$;
|
||||
});
|
||||
|
||||
test("trim", function() {
|
||||
expect(4);
|
||||
|
||||
var nbsp = String.fromCharCode(160);
|
||||
|
||||
equals( jQuery.trim("hello "), "hello", "trailing space" );
|
||||
equals( jQuery.trim(" hello"), "hello", "leading space" );
|
||||
equals( jQuery.trim(" hello "), "hello", "space on both sides" );
|
||||
equals( jQuery.trim(" " + nbsp + "hello " + nbsp + " "), "hello", " " );
|
||||
});
|
||||
|
||||
test("isFunction", function() {
|
||||
expect(19);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user