From: Wolfram Schneider Date: Wed, 21 Aug 2013 16:04:21 +0000 (+0200) Subject: refactor to use local vars X-Git-Tag: 0.9.1~202^2~88 X-Git-Url: http://jsfdemo.indexdata.com/?a=commitdiff_plain;h=ea92871be7063838ddeb6529d7f0fdae2bbd4063;p=mkws-moved-to-github.git refactor to use local vars --- diff --git a/test/spec/jsdom.spec.js b/test/spec/jsdom.spec.js index 77f6770..4edf683 100644 --- a/test/spec/jsdom.spec.js +++ b/test/spec/jsdom.spec.js @@ -4,13 +4,14 @@ * */ -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(); + + var $ = require('jquery'); + var jq = require('jquery').create(); + var jQuery = require('jquery').create(myWindow); + it("jQuery append test", function() { jQuery("

test passes h1

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

/); @@ -26,9 +27,6 @@ describe("jQuery suite", function() { expect( jq("body").html() ).toMatch(/

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