mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Minor tweak to adjust ReactDOM-test for #8356
**what is the change?:** Changed a test to look for the warning we added in https://github.com/facebook/react/pull/8356/files **why make this change?:** To update our tests for new behavior. **test plan:** `npm run test` **issue:** https://github.com/facebook/react/issues/9398
This commit is contained in:
@@ -109,11 +109,11 @@ describe('ReactDOM', () => {
|
||||
expect(dog.className).toBe('bigdog');
|
||||
});
|
||||
|
||||
it('allow React.DOM factories to be called without warnings', () => {
|
||||
it('throws warning when React.DOM factories are called', () => {
|
||||
spyOn(console, 'error');
|
||||
var element = React.DOM.div();
|
||||
expect(element.type).toBe('div');
|
||||
expect(console.error.calls.count()).toBe(0);
|
||||
expect(console.error.calls.count()).toBe(1);
|
||||
});
|
||||
|
||||
it('throws in render() if the mount callback is not a function', () => {
|
||||
|
||||
Reference in New Issue
Block a user