From e62da28caef1908b914e6aebc37da360e52298d8 Mon Sep 17 00:00:00 2001 From: Andrew Peace Date: Fri, 1 Mar 2019 11:38:52 -0500 Subject: [PATCH 1/2] Make jsdom accessible as a global object --- index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/index.js b/index.js index 7827bd5..daa9cd3 100644 --- a/index.js +++ b/index.js @@ -27,6 +27,7 @@ module.exports = function globalJsdom (html, options) { var jsdom = require('jsdom') var document = new jsdom.JSDOM(html, options) + global.jsdom = document; var window = document.window KEYS.forEach(function (key) { From dacbad5e05af88c010df5f839a1c3106a17d3ac4 Mon Sep 17 00:00:00 2001 From: Andrew Peace Date: Fri, 1 Mar 2019 11:57:07 -0500 Subject: [PATCH 2/2] Remove extra semicolon --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index daa9cd3..9aae040 100644 --- a/index.js +++ b/index.js @@ -27,7 +27,7 @@ module.exports = function globalJsdom (html, options) { var jsdom = require('jsdom') var document = new jsdom.JSDOM(html, options) - global.jsdom = document; + global.jsdom = document var window = document.window KEYS.forEach(function (key) {