Add global navigator setting to modify the error, 'navigator is not defined', in testing with react-router link
This commit is contained in:
parent
2eba18e307
commit
d976e01015
|
@ -11,6 +11,7 @@ import reducers from '../src/reducers';
|
||||||
|
|
||||||
global.document = jsdom.jsdom('<!doctype html><html><body></body></html>');
|
global.document = jsdom.jsdom('<!doctype html><html><body></body></html>');
|
||||||
global.window = global.document.defaultView;
|
global.window = global.document.defaultView;
|
||||||
|
global.navigator = global.window.navigator;
|
||||||
const $ = _$(window);
|
const $ = _$(window);
|
||||||
|
|
||||||
chaiJquery(chai, chai.util, $);
|
chaiJquery(chai, chai.util, $);
|
||||||
|
|
Loading…
Reference in New Issue