Skip to content

Commit 565870b

Browse files
author
Markus Günther
committed
Fix: Update the jsdom usage after upgrade
The usage of jsdom change a bit. They use now uppercase object and need the new declarator.
1 parent 3c8adec commit 565870b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Diff for: test/components/ThemeProvider.spec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import React, { Component } from 'react'
22
import PropTypes from 'prop-types'
33
import TestUtils from 'react-dom/test-utils'
44
import { ThemeProvider } from '../../src/index'
5-
import { jsdom } from 'jsdom'
5+
import { JSDOM } from 'jsdom'
66

7-
const documentDom = jsdom('<!doctype html><html><body></body></html>')
7+
const documentDom = new JSDOM(`<!doctype html><html><body></body></html>`)
88
beforeEach(() => {
99
global.document = documentDom
1010
global.window = document.defaultView

Diff for: test/components/themr.spec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import React, { Children, Component } from 'react'
22
import PropTypes from 'prop-types'
3-
import { jsdom } from 'jsdom'
3+
import { JSDOM } from 'jsdom'
44
import TestUtils from 'react-dom/test-utils'
55
import sinon from 'sinon'
66
import { render } from 'react-dom'
77
import shallowEqual from 'fbjs/lib/shallowEqual'
88
import { themr, themeable } from '../../src/index'
99

10-
const documentDom = jsdom('<!doctype html><html><body></body></html>')
10+
const documentDom = new JSDOM(`<!doctype html><html><body></body></html>`)
1111

1212
describe('Themr decorator function', () => {
1313
class Passthrough extends Component {

0 commit comments

Comments
 (0)