UNPKG
react-select-extended
Version:
latest (1.0.0)
1.0.0
A Select control built with and for ReactJS
github.com/JedWatson/react-select
JedWatson/react-select
react-select-extended
/
testHelpers
/
jsdomHelper.js
14 lines
(11 loc)
•
261 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
module
.
exports
=
function
(
html
) {
if
(
typeof
document
!==
'undefined'
) {
return
; }
var
jsdom =
require
(
'jsdom'
).
jsdom
;
global
.
document
=
jsdom
(html ||
''
);
global
.
window
=
global
.
document
.
defaultView
;
global
.
navigator
= {
userAgent
:
'JSDOM'
}; };