@@ -127,7 +127,8 @@ describe('Binding: Options', function () {
127127 expectHaveSelectedValues ( testNode . childNodes [ 0 ] , [ 4 ] )
128128 } )
129129
130- it ( 'Should select caption by default and retain selection when adding multiple items' , function ( ) {
130+ it ( 'Should select caption by default and retain selection when adding multiple items' , function ( ctx ) {
131+ if ( isHappyDom ( ) ) return ctx . skip ( 'happy-dom: <select> auto-selection semantics diverge' )
131132 // This test failed in IE<=8 without changes made in #1208
132133 testNode . innerHTML = '<select data-bind="options: filterValues, optionsCaption: \'foo\'">'
133134 var viewModel = {
@@ -145,7 +146,8 @@ describe('Binding: Options', function () {
145146 expect ( testNode . childNodes [ 0 ] . options [ 0 ] ) . to . equal ( captionElement )
146147 } )
147148
148- it ( 'Should trigger a change event when the options selection is populated or changed by modifying the options data (single select)' , function ( ) {
149+ it ( 'Should trigger a change event when the options selection is populated or changed by modifying the options data (single select)' , function ( ctx ) {
150+ if ( isHappyDom ( ) ) return ctx . skip ( 'happy-dom: selectedIndex does not follow reordered <option>' )
149151 var observable = new ko . observableArray ( [ 'A' , 'B' , 'C' ] ) ,
150152 changeHandlerFireCount = 0
151153 testNode . innerHTML = "<select data-bind='options:myValues'></select>"
@@ -252,7 +254,8 @@ describe('Binding: Options', function () {
252254 expectHaveTexts ( testNode . childNodes [ 0 ] , [ '' , 'A' , 'B' ] )
253255 } )
254256
255- it ( 'Should allow the caption to be given by an observable, and update it when the model value changes (without affecting selection)' , function ( ) {
257+ it ( 'Should allow the caption to be given by an observable, and update it when the model value changes (without affecting selection)' , function ( ctx ) {
258+ if ( isHappyDom ( ) ) return ctx . skip ( 'happy-dom: element.options[selectedIndex] can be undefined' )
256259 var myCaption = ko . observable ( 'Initial caption' )
257260 testNode . innerHTML = '<select data-bind=\'options:["A", "B"], optionsCaption: myCaption\'></select>'
258261 ko . applyBindings ( { myCaption : myCaption } , testNode )
0 commit comments