Skip to content

Commit 153c847

Browse files
committed
resolve JSDOM upgrade
1 parent 0bf3241 commit 153c847

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
"lint": "eslint . --ext .js,.jsx",
1010
"coverage": "nyc --reporter lcov --reporter text --extension .jsx --require babel-register npm run test",
1111
"build": "rollup -c",
12-
"prepublish": "npm run build"
12+
"prepublish": "npm run build && npm run test",
13+
"release": "npm run -s build && git commit -am $npm_package_version && git tag $npm_package_version && git push && git push --tags && npm publish"
1314
},
1415
"files": [
1516
"dist"

test/setup.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { jsdom } from 'jsdom';
1+
import { JSDOM } from 'jsdom';
22

3-
const dom = jsdom('<!doctype html><html><body></body></html>');
3+
const { window } = new JSDOM('<!doctype html><html><body></body></html>');
44

5-
global.document = dom;
6-
global.window = dom.defaultView;
5+
global.document = window.document;
6+
global.window = window;

0 commit comments

Comments
 (0)