X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=test%2Fspec%2Fjquery.spec.js;h=152f71975751862477465bb16452f25d874338bf;hb=b2f105ea2c3a05d605daf133da207220b7f639b0;hp=1a59cf2b83a6bb55e4b3c9868d0391d6eb95fce1;hpb=7f16806f51445cf3d5759a31e5752694cd9708c8;p=mkws-moved-to-github.git diff --git a/test/spec/jquery.spec.js b/test/spec/jquery.spec.js index 1a59cf2..152f719 100644 --- a/test/spec/jquery.spec.js +++ b/test/spec/jquery.spec.js @@ -1,28 +1,32 @@ -var $ = jQuery = require('jquery'); +/* Copyright (c) 2013 Index Data ApS. http://indexdata.com + * + * jQuery test + * + */ -describe("jQuery suite", function() { - it("jQuery append test", function() { - jQuery("

test passes h1

").appendTo("body"); - expect( $("body").html() ).toMatch(/

/); +describe("jQuery suite simple", function () { + var $ = require('jQuery'); - jQuery("

this is a paragraph

").appendTo("h1"); - expect( $("body").html() ).toMatch(/this is a paragraph/); - }); + it("jQuery append test", function () { + $("body").append("

test passes h1

"); + expect($("body").html()).toMatch(/

/); + $("

this is a paragraph

").appendTo("h1"); + expect($("body").html()).toMatch(/this is a paragraph/); + }); - it("$ append test", function() { - $("

test passes h2

").appendTo("body"); - expect( $("body").html() ).toMatch(/

/); + it("$ append test", function () { + $("

test passes h2

").appendTo("body"); + expect($("body").html()).toMatch(/

/); - $("

this is a second paragraph

").appendTo("h1"); - expect( $("body").html() ).toMatch(/this is a paragraph/); - }); + $("

this is a second paragraph

").appendTo("h1"); + expect($("body").html()).toMatch(/this is a paragraph/); + }); - it("more jquery tests", function() { - // other tests - expect( $("h2").html() ).toMatch(/test passes h2/); - expect( $("h1").html() ).toMatch(/test passes h1/); - expect( $("h1").html() ).not.toMatch(/^$/); - expect( $("h1").html() ).not.toMatch(/foobar/); - }); + it("more jquery tests", function () { + // other tests + expect($("h2").html()).toMatch(/test passes h2/); + expect($("h1").html()).toMatch(/test passes h1/); + expect($("h1").html()).not.toMatch(/^$/); + expect($("h1").html()).not.toMatch(/foobar/); + }); }); -