summaryrefslogtreecommitdiffhomepage
path: root/test/components/SelectLocation.spec.js
diff options
context:
space:
mode:
authorAndrej Mihajlov <and@mullvad.net>2018-02-21 10:45:11 +0100
committerAndrej Mihajlov <and@mullvad.net>2018-02-21 10:45:11 +0100
commitde737c54c413f96c35b4e9bc6280fc7d26e4fa83 (patch)
tree0cf470c59b4c7c8a6327e64610f68f5facd78d6d /test/components/SelectLocation.spec.js
parentae9c255b3ecdec341090c932db6cb261147a7382 (diff)
parent1214138633bcca19a1b96622400f3fbcf4044bd9 (diff)
downloadmullvadvpn-de737c54c413f96c35b4e9bc6280fc7d26e4fa83.tar.xz
mullvadvpn-de737c54c413f96c35b4e9bc6280fc7d26e4fa83.zip
Merge branch 'update-flow'
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) => {