1 /* Copyright (c) 2013 IndexData ApS. http://indexdata.com
7 var $ = jQuery = require('jquery');
9 describe("jQuery suite", function() {
10 it("jQuery append test", function() {
11 jQuery("<h1>test passes h1</h1>").appendTo("body");
12 expect( $("body").html() ).toMatch(/<h1>/);
14 jQuery("<p>this is a paragraph</p>").appendTo("h1");
15 expect( $("body").html() ).toMatch(/this is a paragraph/);
18 it("$ append test", function() {
19 $("<h2>test passes h2</h2>").appendTo("body");
20 expect( $("body").html() ).toMatch(/<h2>/);
22 $("<p>this is a second paragraph</p>").appendTo("h1");
23 expect( $("body").html() ).toMatch(/this is a paragraph/);
26 it("more jquery tests", function() {
28 expect( $("h2").html() ).toMatch(/test passes h2/);
29 expect( $("h1").html() ).toMatch(/test passes h1/);
30 expect( $("h1").html() ).not.toMatch(/^$/);
31 expect( $("h1").html() ).not.toMatch(/foobar/);