dillon1000/react

Commit

Don't use magic browser event dispatching for simulated events

When calling ReactTestUtils.Simulate, sometimes you want to test that an exception is thrown by the event handler. This lets you do that without relying on the fact that old jsdom doesn't implement `Event`.
Browse files
Changed paths7 files
First-parent comparison
M src/renderers/dom/client/eventPlugins/ChangeEventPlugin.js ModifiedM src/renderers/shared/event/EventPluginHub.js ModifiedM src/renderers/shared/event/EventPluginUtils.js ModifiedM src/renderers/shared/event/eventPlugins/__tests__/ResponderEventPlugin-test.js ModifiedM src/renderers/shared/reconciler/ReactEventEmitterMixin.js ModifiedM src/shared/utils/ReactErrorUtils.js ModifiedM src/test/ReactTestUtils.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…