File tree 1 file changed +3
-12
lines changed
1 file changed +3
-12
lines changed Original file line number Diff line number Diff line change @@ -1026,22 +1026,13 @@ describe('jqLite', function() {
1026
1026
'<option>test 2</option>' +
1027
1027
'</select>' ) . val ( ) ) . toEqual ( [ 'test 1' ] ) ;
1028
1028
1029
- // In jQuery >= 3.0 .val() on select[multiple] with no selected options returns an
1030
- // empty array, not null.
1031
- // See https://github.com/jquery/jquery/issues/2562 for more details.
1032
- // jqLite will align with jQuery 3.0 behavior in Angular 1.6.
1033
- var val ;
1034
- if ( _jqLiteMode || isJQuery2x ( ) ) {
1035
- val = null ;
1036
- } else {
1037
- val = [ ] ;
1038
- }
1039
-
1029
+ // In jQuery < 3.0 .val() on select[multiple] with no selected options returns an
1030
+ // null instead of an empty array.
1040
1031
expect ( jqLite (
1041
1032
'<select multiple>' +
1042
1033
'<option>test 1</option>' +
1043
1034
'<option>test 2</option>' +
1044
- '</select>' ) . val ( ) ) . toEqual ( val ) ;
1035
+ '</select>' ) . val ( ) ) . toEqualOneOf ( null , [ ] ) ;
1045
1036
} ) ;
1046
1037
} ) ;
1047
1038
You can’t perform that action at this time.
0 commit comments