Skip to content

Commit

Permalink
Remove innerText calls to fix tests in FF
Browse files Browse the repository at this point in the history
  • Loading branch information
statianzo committed Sep 24, 2012
1 parent befb741 commit ef9a1c1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
8 changes: 5 additions & 3 deletions test/spec/attrs.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,12 @@
});

it('sets property of all selected elements', function() {
var root = jquip('<div><i>a</i><i>b</i><i>c</i></div>');
root.find('i').prop('innerText', 'x');
var root = jquip('<div><i>a</i><i>b</i><i>c</i></div>'),
els = root.find('i').prop('foo', 'x');

expect(root.text()).toBe('xxx');
expect(els[0].foo).toBe('x');
expect(els[1].foo).toBe('x');
expect(els[2].foo).toBe('x');
});


Expand Down
2 changes: 1 addition & 1 deletion test/spec/find.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
spyOn(console, 'warn');
var res = $('<p>foo</p> <p><i class="yo">bar</i></p>').find('.yo')
expect(res.length).toBe(1);
expect(res[0].innerText).toBe('bar');
expect(res[0].innerHTML).toBe('bar');
expect(console.warn).not.toHaveBeenCalled();
});

Expand Down
8 changes: 4 additions & 4 deletions test/spec/wrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@
var clones = els.clone();
clones.html('x')

expect(els[0].innerText).toBe('1')
expect(els[1].innerText).toBe('2')
expect(els[0].innerHTML).toBe('1')
expect(els[1].innerHTML).toBe('2')

expect(clones[0].innerText).toBe('x')
expect(clones[1].innerText).toBe('x')
expect(clones[0].innerHTML).toBe('x')
expect(clones[1].innerHTML).toBe('x')
});
});
}());

0 comments on commit ef9a1c1

Please sign in to comment.