UNPKG

istesequi

Version:

Lightweight and intuitive javascript library

22 lines (18 loc) 609 B
// Testing the main file describe(".after(html)", function() { beforeEach(function(){ expect(u('.bla').nodes.length).to.equal(0); }); afterEach(function(){ u('.bla').remove(); }); it("should be a function", function() { expect(typeof base.after).to.equal('function'); }); it("can add content in the right place", function() { base.after('<a class="bla">Link</a>'); expect(u('.bla').nodes.length).to.equal(1); expect(base.parent().find('.base, .bla').nodes.length).to.equal(2); expect(base.parent().find('.base ~ .bla').nodes.length).to.equal(1); }); });