UNPKG

istesequi

Version:

Lightweight and intuitive javascript library

24 lines (19 loc) 717 B
// Testing the main file describe(".children(selector)", function() { afterEach(function(){ // A previous bug that would change the inner of the original reference expect(base.nodes.length).to.equal(1); }); it("should be a function", function() { expect(typeof base.children).to.equal('function'); }); it("can select the children of ul", function() { expect(base.find('ul').children().nodes.length).to.equal(3); }); it("can filter the children", function() { expect(base.find('ul').children(':first-child').nodes.length).to.equal(1); }); it("okay with no children", function() { expect(base.find('ul').children('.nonexist').nodes.length).to.equal(0); }); });