Browse files

Fix assertions against html for IE8 compat

  • Loading branch information...
1 parent 1ac450c commit 234d84e29ea93b712d940d9ee24aa5dcf42a6813 @statianzo statianzo committed Sep 27, 2012
Showing with 3 additions and 3 deletions.
  1. +2 −2 test/spec/accessors.js
  2. +1 −1 test/spec/wrap.js
View
4 test/spec/accessors.js
@@ -38,13 +38,13 @@
it('gets html of element', function() {
var el = $('<div><i>Hello</i></div>');
- expect(el.html()).toBe('<i>Hello</i>');
+ expect(el.html()).toMatch(/<i>Hello<\/i>/i);
});
it('sets html of element', function() {
var el = $('<div><i>Hello</i></div>');
el.html('<b>zing</b>');
- expect(el.html()).toBe('<b>zing</b>');
+ expect(el.html()).toMatch(/<b>zing<\/b>/i);
});
describe('text', function() {
View
2 test/spec/wrap.js
@@ -39,7 +39,7 @@
it('wraps multiple nodes', function() {
var list = $('<ul><li>1</li><li>2</li></ul>').appendTo('body');
list.find('li').contents().wrap('<b>');
- expect(list.html()).toBe('<li><b>1</b></li><li><b>2</b></li>');
+ expect(list.find('b').length).toBe(2);
list.remove();
});

0 comments on commit 234d84e

Please sign in to comment.