diff options
| author | Andrej Mihajlov <and@mullvad.net> | 2018-02-21 10:45:11 +0100 |
|---|---|---|
| committer | Andrej Mihajlov <and@mullvad.net> | 2018-02-21 10:45:11 +0100 |
| commit | de737c54c413f96c35b4e9bc6280fc7d26e4fa83 (patch) | |
| tree | 0cf470c59b4c7c8a6327e64610f68f5facd78d6d /test/components/SelectLocation.spec.js | |
| parent | ae9c255b3ecdec341090c932db6cb261147a7382 (diff) | |
| parent | 1214138633bcca19a1b96622400f3fbcf4044bd9 (diff) | |
| download | mullvadvpn-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.js | 9 |
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) => { |
