Skip to content

Commit

Permalink
added test
Browse files Browse the repository at this point in the history
  • Loading branch information
5saviahv committed Jan 4, 2021
1 parent c2342be commit 190b751
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/api/traversing.js
Original file line number Diff line number Diff line change
Expand Up @@ -619,6 +619,12 @@ describe('$(...)', function () {
expect(result[1].attribs.id).toBe('vegetables');
});

it('(undefined) : should not throw an exception', function () {
expect(function () {
$('li').parent(undefined);
}).not.toThrow();
});

it('() : should return an empty object for top-level elements', function () {
var result = $('html').parent();
expect(result).toHaveLength(0);
Expand Down

0 comments on commit 190b751

Please sign in to comment.