Browse Source

Test ReactJSDOM cleans up globals

pull/5/head
Luke Childs 7 years ago
parent
commit
99e50be7eb
  1. 10
      test/react-jsdom.js

10
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')

Loading…
Cancel
Save