From 71d61ebdc418f9c206ef2835bc8c2a9636a19b96 Mon Sep 17 00:00:00 2001 From: Steven Sanderson Date: Fri, 25 Apr 2014 10:54:51 +0100 Subject: [PATCH] Fix component binding specs on IE < 9 --- spec/components/componentBindingBehaviors.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/spec/components/componentBindingBehaviors.js b/spec/components/componentBindingBehaviors.js index a9d73ffc5..2b5fbb366 100644 --- a/spec/components/componentBindingBehaviors.js +++ b/spec/components/componentBindingBehaviors.js @@ -57,8 +57,8 @@ 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 @@ -66,7 +66,7 @@ describe('Components: Component binding', function() { // See the template asynchronously shows up jasmine.Clock.tick(1); - expect(testNode.childNodes[0].innerHTML).toBe('
Hello
World'); + expect(testNode.childNodes[0]).toContainHtml('
hello
world'); // Also be sure it's a clone expect(testNode.childNodes[0].childNodes[0]).not.toBe(testTemplate[0]); @@ -516,9 +516,9 @@ describe('Components: Component binding', function() { }); it('Supports virtual elements', function() { - testNode.innerHTML = 'Hello! Goodbye.'; + testNode.innerHTML = 'Hello!   Goodbye.'; ko.components.register(testComponentName, { - template: 'Your param is ' + template: 'Your param is  ' }); testComponentParams.someData = ko.observable(123);