Skip to content

Commit

Permalink
Change jsdom version
Browse files Browse the repository at this point in the history
  • Loading branch information
38elements committed Nov 11, 2017
1 parent 2427383 commit a23a483
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@
"eslint-plugin-promise": "^3.4.0",
"eslint-plugin-standard": "^3.0.1",
"expect.js": "^0.3.1",
"jsdom": "^10.1.0",
"jsdom": "^9.12.0",
"karma": "^1.7.1",
"karma-browserify": "^5.0.5",
"karma-chrome-launcher": "^2.0.0",
Expand Down
16 changes: 8 additions & 8 deletions test/reporters/html.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ var Suite = mocha.Suite;
var Runner = mocha.Runner;
var reporters = require('../../').reporters;
var HTML = reporters.HTML;
var JSDOM = require('jsdom').JSDOM;
var jsdom = require('jsdom').jsdom;

describe('HTML reporter', function () {
var dom;
var doc;
var html;
var runner;

beforeEach(function () {
dom = new JSDOM('<!DOCTYPE html><html><body><div id="mocha"></div></body></html>');
global.window = dom.window;
global.document = dom.window.document;
doc = jsdom('<!DOCTYPE html><html><body><div id="mocha"></div></body></html>');
global.window = doc.defaultView;
global.document = doc.defaultView.document;
window.HTMLCanvasElement.prototype.getContext = function () {
return {
scale: function () {}
Expand All @@ -28,9 +28,9 @@ describe('HTML reporter', function () {

describe('constructor', function () {
it('should post error message if #mocha does not exist', function () {
dom = new JSDOM('<!DOCTYPE html><html><body></body></html>');
global.window = dom.window;
global.document = dom.window.document;
doc = jsdom('<!DOCTYPE html><html><body></body></html>');
global.window = doc.defaultView;
global.document = doc.defaultView.document;
window.HTMLCanvasElement.prototype.getContext = function () {
return {
scale: function () {}
Expand Down

0 comments on commit a23a483

Please sign in to comment.