From ea92871be7063838ddeb6529d7f0fdae2bbd4063 Mon Sep 17 00:00:00 2001 From: Wolfram Schneider Date: Wed, 21 Aug 2013 18:04:21 +0200 Subject: [PATCH] refactor to use local vars --- test/spec/jsdom.spec.js | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) 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(); }); -- 1.7.10.4