diff --git a/test/api/traversing.js b/test/api/traversing.js index 7ed5786af3..7ace244322 100644 --- a/test/api/traversing.js +++ b/test/api/traversing.js @@ -47,6 +47,11 @@ describe('$(...)', function() { expect($('#fruits').find('LI')).to.have.length(3); }); + it('should query immediate descendant only', function() { + var $ = cheerio.load(''); + expect($('foo').find('> bar')).to.have.length(1); + }); + it('should query case-sensitively when in xmlMode', function() { var q = cheerio.load('', {xmlMode: true}); expect(q('caseSenSitive')).to.have.length(1);