spec/react/event_spec.rb in hyper-react-0.10.0 vs spec/react/event_spec.rb in hyper-react-0.11.0
- old
+ new
@@ -15,10 +15,10 @@
expect(event.timestamp).to eq(`#{event.to_n}.timeStamp`)
expect(event.event_type).to eq(`#{event.to_n}.type`)
expect(event).to respond_to(:prevent_default)
expect(event).to respond_to(:stop_propagation)
end
- instance = renderElementToDocument(element)
- simulateEvent(:click, instance)
+ dom_node = React::Test::Utils.render_into_document(element)
+ React::Test::Utils.simulate(:click, dom_node)
end
end
end