Skip to content

Commit ba30279

Browse files
author
Gabriel Schulhof
committed
Widget: Test processing of empty classes key
Tests previous commit
1 parent ea5e492 commit ba30279

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/unit/widget/widget_core.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -608,17 +608,20 @@ test( ".option() - deep option setter", function() {
608608
});
609609

610610
test( "_classes", function(){
611-
expect( 3 );
611+
expect( 4 );
612612
$.widget( "ui.testWidget", {
613613
options: {
614614
classes: {
615615
"test": "class1 class2",
616+
"testEmpty": "",
616617
"test2": "class3"
617618
}
618619
},
619620
_create: function() {
620621
equal( this._classes( "test" ), "test class1 class2" );
621622
equal( this._classes( "test2" ), "test2 class3" );
623+
equal( this._classes( "testEmpty" ), "testEmpty",
624+
"Computed value of empty-string-valued class key has no extra spaces" );
622625
equal( this._classes( "test test2" ), "test2 class3 test class1 class2" );
623626
}
624627
});

0 commit comments

Comments
 (0)