Skip to content

Commit

Permalink
Fix textInput test in IE9 (see knockout#1788)
Browse files Browse the repository at this point in the history
  • Loading branch information
mbest committed Aug 31, 2015
1 parent 967389d commit e3e4b13
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion spec/defaultBindings/textInputBehaviors.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,14 @@ describe('Binding: TextInput', function() {
if (!jasmine.ieVersion || jasmine.ieVersion >= 9) {
ko.utils.triggerEvent(testNode.childNodes[0], "input");
}
expect(myobservable()).toEqual("some user-entered value");
if (jasmine.ieVersion === 9) {
// IE 9 responds to the event asynchronously (see #1788)
waitsFor(function () {
return myobservable() === "some user-entered value";
}, 50);
} else {
expect(myobservable()).toEqual("some user-entered value");
}
});

it('Should write only changed values to observable', function () {
Expand Down

0 comments on commit e3e4b13

Please sign in to comment.