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