X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=test%2Fspec%2Fjsdom.spec.js;h=273f591c8c41ed0ea5b05f1976a7cb34788410b6;hb=b2f105ea2c3a05d605daf133da207220b7f639b0;hp=77f677050c1c0127f6d1875e4291ab397167b227;hpb=55214bb5f3c1770b8ac68766adc1dbb7db106450;p=mkws-moved-to-github.git diff --git a/test/spec/jsdom.spec.js b/test/spec/jsdom.spec.js index 77f6770..273f591 100644 --- a/test/spec/jsdom.spec.js +++ b/test/spec/jsdom.spec.js @@ -1,35 +1,33 @@ -/* Copyright (c) 2013 IndexData ApS. http://indexdata.com +/* Copyright (c) 2013 Index Data ApS. http://indexdata.com * * jQuery test with DOM/windows object * */ -var jsdom = require('jsdom').jsdom; -var myWindow = jsdom().createWindow(); -var $ = require('jquery'); -var jq = require('jquery').create(); -var jQuery = require('jquery').create(myWindow); +describe("jQuery suite", function () { + var jsdom = require('jsdom').jsdom; + var myWindow = jsdom().createWindow(); -describe("jQuery suite", function() { - it("jQuery append test", function() { - jQuery("

test passes h1

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

/); - }); + var $ = require('jQuery'); + var jq = require('jQuery').create(); + var jQuery = require('jQuery').create(myWindow); - it("$ append test", function() { - $("

test passes h2

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

/); - }); + it("jQuery append test", function () { + jQuery("

test passes h1

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

/); + }); - it("jq append test", function() { - jq("

test passes h2

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

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

test passes h2

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

/); + }); -}); + it("jq append test", function () { + jq("

test passes h2

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

/); + }); -describe("jsdom suite", function() { - it("window test", function() { - expect(myWindow).toBeDefined(); - }); + it("window test", function () { + expect(myWindow).toBeDefined(); + }); });