1 var $ = jQuery = require('jquery');
3 describe("jQuery suite", function() {
4 it("jQuery append test", function() {
5 jQuery("<h1>test passes h1</h1>").appendTo("body");
6 expect( $("body").html() ).toMatch(/<h1>/);
8 jQuery("<p>this is a paragraph</p>").appendTo("h1");
9 expect( $("body").html() ).toMatch(/this is a paragraph/);
12 it("$ append test", function() {
13 $("<h2>test passes h2</h2>").appendTo("body");
14 expect( $("body").html() ).toMatch(/<h2>/);
16 $("<p>this is a second paragraph</p>").appendTo("h1");
17 expect( $("body").html() ).toMatch(/this is a paragraph/);
20 it("more jquery tests", function() {
22 expect( $("h2").html() ).toMatch(/test passes h2/);
23 expect( $("h1").html() ).toMatch(/test passes h1/);
24 expect( $("h1").html() ).not.toMatch(/^$/);
25 expect( $("h1").html() ).not.toMatch(/foobar/);