Add global navigator setting to modify the error, 'navigator is not defined', in testing with react-router link

This commit is contained in:
tomoaki 2016-04-21 16:31:25 +09:00
parent 2eba18e307
commit d976e01015
1 changed files with 1 additions and 0 deletions

View File

@ -11,6 +11,7 @@ import reducers from '../src/reducers';
global.document = jsdom.jsdom('<!doctype html><html><body></body></html>');
global.window = global.document.defaultView;
global.navigator = global.window.navigator;
const $ = _$(window);
chaiJquery(chai, chai.util, $);