Skip to content

Commit

Permalink
Solving breaking changes for upgrading jsdom.
Browse files Browse the repository at this point in the history
  • Loading branch information
MythicAngel authored and MythicAngel committed Jul 15, 2018
1 parent 93d189e commit bdde3a8
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 13 deletions.
13 changes: 9 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"license": "Apache-2.0",
"dependencies": {
"@types/jquery": "^3.3.4",
"jquery": "^3.1.0"
"jquery": "^3.2.1"
},
"devDependencies": {
"chai": "^4.1.2",
Expand Down
13 changes: 5 additions & 8 deletions test/keyboard.test.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
// window and document
var jsdom = require('jsdom').jsdom;
window = jsdom().defaultView;
document = window.document;
jQuery = require('jquery');
$ = jQuery;
window.jQuery = jQuery;
navigator = window.navigator;
const {JSDOM} = require('jsdom');
const dom = new JSDOM(`<!DOCTYPE html><html><head></head><body></body></html>`);
global.window = dom;
global.document = dom;
const $ = require('jquery');

// assertion
chai = require('chai');
Expand Down

0 comments on commit bdde3a8

Please sign in to comment.