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