@@ -120,8 +120,8 @@ test( "label - default", function() {
120
120
widget = checkbox . checkboxradio ( "widget" ) ;
121
121
strictEqual ( checkbox . checkboxradio ( "option" , "label" ) ,
122
122
"checkbox label" , "When no value passed on create text from dom is used for option" ) ;
123
- strictEqual ( widget . text ( ) ,
124
- " checkbox label" , "When no value passed on create text from dom is used in dom" ) ;
123
+ strictEqual ( $ . trim ( widget . text ( ) ) ,
124
+ "checkbox label" , "When no value passed on create text from dom is used in dom" ) ;
125
125
} ) ;
126
126
test ( "label - explicit value" , function ( ) {
127
127
expect ( 5 ) ;
@@ -134,8 +134,8 @@ test( "label - explicit value", function() {
134
134
135
135
strictEqual ( checkbox . checkboxradio ( "option" , "label" ) ,
136
136
"foo" , "When value is passed on create value is used for option" ) ;
137
- strictEqual ( widget . text ( ) ,
138
- " foo" , "When value is passed on create value is used in dom" ) ;
137
+ strictEqual ( $ . trim ( widget . text ( ) ) ,
138
+ "foo" , "When value is passed on create value is used in dom" ) ;
139
139
strictEqual ( icon . length , 1 ,
140
140
"Icon is preserved when label is set on init when wrapped in label" ) ;
141
141
strictEqual ( iconSpace . length , 1 ,
@@ -159,8 +159,8 @@ test( "label - explicit null value", function() {
159
159
widget = checkbox . checkboxradio ( "widget" ) ;
160
160
strictEqual ( checkbox . checkboxradio ( "option" , "label" ) ,
161
161
"checkbox label" , "When null is passed on create text from dom is used for option" ) ;
162
- strictEqual ( widget . text ( ) ,
163
- " checkbox label" , "When null is passed on create text from dom is used in dom" ) ;
162
+ strictEqual ( $ . trim ( widget . text ( ) ) ,
163
+ "checkbox label" , "When null is passed on create text from dom is used in dom" ) ;
164
164
165
165
} ) ;
166
166
@@ -175,14 +175,14 @@ test( "label", function() {
175
175
checkbox . checkboxradio ( "option" , "label" , "bar" ) ;
176
176
strictEqual ( checkbox . checkboxradio ( "option" , "label" ) ,
177
177
"bar" , "When value is passed value is used for option" ) ;
178
- strictEqual ( widget . text ( ) ,
179
- " bar" , "When value is passed value is used in dom" ) ;
178
+ strictEqual ( $ . trim ( widget . text ( ) ) ,
179
+ "bar" , "When value is passed value is used in dom" ) ;
180
180
181
181
checkbox . checkboxradio ( "option" , "label" , null ) ;
182
182
strictEqual ( checkbox . checkboxradio ( "option" , "label" ) ,
183
183
"bar" , "When null is passed text from dom is used for option" ) ;
184
- strictEqual ( widget . text ( ) ,
185
- " bar" , "When null is passed text from dom is used in dom" ) ;
184
+ strictEqual ( $ . trim ( widget . text ( ) ) ,
185
+ "bar" , "When null is passed text from dom is used in dom" ) ;
186
186
187
187
} ) ;
188
188
0 commit comments