diff --git a/test/react-jsdom.js b/test/react-jsdom.js index 4519cb8..d4467aa 100644 --- a/test/react-jsdom.js +++ b/test/react-jsdom.js @@ -7,6 +7,16 @@ test('ReactJSDOM is a object', t => { t.is(typeof ReactJSDOM, 'object'); }); +test('ReactJSDOM cleans up globals', t => { + global.window = 'foo'; + global.document = 'bar'; + ReactJSDOM.render( + React.createElement('div', {}, 'hi') + ); + t.is(global.window, 'foo'); + t.is(global.document, 'bar'); +}); + test('ReactJSDOM renders a React Component', t => { const component = ReactJSDOM.render( React.createElement('div', {}, 'hi')