Skip to content

Commit

Permalink
Fix component binding specs on IE < 9
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveSanderson committed Apr 25, 2014
1 parent 3994a15 commit 71d61eb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions spec/components/componentBindingBehaviors.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,16 @@ describe('Components: Component binding', function() {
testTemplate.appendChild(document.createElement('div'));
testTemplate.appendChild(document.createTextNode(' '));
testTemplate.appendChild(document.createElement('span'));
testTemplate.childNodes[0].innerHTML = 'Hello';
testTemplate.childNodes[2].innerHTML = 'World';
testTemplate.childNodes[0].innerHTML = 'hello';
testTemplate.childNodes[2].innerHTML = 'world';
ko.components.register(testComponentName, { template: testTemplate });

// Bind using just the component name since we're not setting any params
ko.applyBindings({ testComponentBindingValue: testComponentName }, testNode);

// See the template asynchronously shows up
jasmine.Clock.tick(1);
expect(testNode.childNodes[0].innerHTML).toBe('<div>Hello</div> <span>World</span>');
expect(testNode.childNodes[0]).toContainHtml('<div>hello</div> <span>world</span>');

// Also be sure it's a clone
expect(testNode.childNodes[0].childNodes[0]).not.toBe(testTemplate[0]);
Expand Down Expand Up @@ -516,9 +516,9 @@ describe('Components: Component binding', function() {
});

it('Supports virtual elements', function() {
testNode.innerHTML = 'Hello! <!-- ko component: testComponentBindingValue --><!-- /ko --> Goodbye.';
testNode.innerHTML = 'Hello! <!-- ko component: testComponentBindingValue -->&nbsp;<!-- /ko --> Goodbye.';
ko.components.register(testComponentName, {
template: 'Your param is <span data-bind="text: someData"></span>'
template: 'Your param is <span data-bind="text: someData">&nbsp;</span>'
});
testComponentParams.someData = ko.observable(123);

Expand Down

0 comments on commit 71d61eb

Please sign in to comment.