summaryrefslogtreecommitdiffhomepage
path: root/test/components/SelectLocation.spec.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/components/SelectLocation.spec.js')
-rw-r--r--test/components/SelectLocation.spec.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/test/components/SelectLocation.spec.js b/test/components/SelectLocation.spec.js
index eb72b03c57..59a8dc9770 100644
--- a/test/components/SelectLocation.spec.js
+++ b/test/components/SelectLocation.spec.js
@@ -1,7 +1,7 @@
// @flow
import { expect } from 'chai';
-import React from 'react';
+import * as React from 'react';
import ReactTestUtils, { Simulate } from 'react-dom/test-utils';
import SelectLocation from '../../app/components/SelectLocation';
@@ -47,7 +47,7 @@ describe('components/SelectLocation', () => {
return Object.assign({}, defaultProps, mergeProps);
};
- const render = (props: SelectLocationProps): SelectLocation => {
+ const render = (props: SelectLocationProps) => {
return ReactTestUtils.renderIntoDocument(
<SelectLocation { ...props } />
);
@@ -58,7 +58,10 @@ describe('components/SelectLocation', () => {
onClose: () => done()
});
const domNode = ReactTestUtils.findRenderedDOMComponentWithClass(render(props), 'select-location__close');
- Simulate.click(domNode);
+ // See: https://github.com/facebook/flow/pull/5841
+ if(domNode) {
+ Simulate.click(domNode);
+ }
});
it('should call select callback for country', (done) => {