Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Commit

Permalink
test(jqLite): add a missing test for jqLite#text
Browse files Browse the repository at this point in the history
  • Loading branch information
IgorMinar authored and rodyhaddad committed Jun 13, 2014
1 parent 9248988 commit 3cbc8e5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/jqLiteSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -881,6 +881,12 @@ describe('jqLite', function() {
expect(element.text('xyz') == element).toBeTruthy();
expect(element.text()).toEqual('xyzxyz');
});

it('should return text only for element or text nodes', function() {
expect(jqLite('<div>foo</div>').text()).toBe('foo');
expect(jqLite('<div>foo</div>').contents().eq(0).text()).toBe('foo');
expect(jqLite(document.createComment('foo')).text()).toBe('');
});
});


Expand Down

0 comments on commit 3cbc8e5

Please sign in to comment.