From e8aa8c62f6ebe816bde9950d9594e32334d9d100 Mon Sep 17 00:00:00 2001 From: Peter Jaszkowiak Date: Wed, 30 Aug 2017 13:27:59 -0600 Subject: [PATCH] Update jsdom --- package.json | 2 +- test/utils.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index d0f774f5e3..3b48246b4e 100644 --- a/package.json +++ b/package.json @@ -109,7 +109,7 @@ "grunt": "^1.0.1", "grunt-contrib-watch": "^1.0.0", "istanbul": "^0.4.2", - "jsdom": "9.12.0", + "jsdom": "^11.2.0", "mocha": "^3.5.0", "mocha-lcov-reporter": "^1.2.0", "xmlhttprequest": "1.8.0", diff --git a/test/utils.js b/test/utils.js index 2366b57d06..d6821d9d4b 100644 --- a/test/utils.js +++ b/test/utils.js @@ -2,19 +2,19 @@ var assert = require('assert'); -var jsdom = require('jsdom'); +var JSDOM = require('jsdom').JSDOM; var utils = require('./../public/src/utils.js'); describe('Utility Methods', function () { // https://gist.github.com/robballou/9ee108758dc5e0e2d028 // create some jsdom magic to allow jQuery to work - var doc = jsdom.jsdom(''); - var window = doc.defaultView; + var dom = new JSDOM(''); + var window = dom.window; global.jQuery = require('jquery')(window); global.$ = global.jQuery; var $ = global.$; - global.window = doc.defaultView; + global.window = window; it('should preserve case if requested', function (done) { var slug = utils.slugify('UPPER CASE', true);