diff options
| author | Andrej Mihajlov <and@mullvad.net> | 2018-02-16 14:11:34 +0100 |
|---|---|---|
| committer | Andrej Mihajlov <and@mullvad.net> | 2018-02-20 17:48:28 +0100 |
| commit | 2c741a45b85ec334c6c09be01f3062065c998265 (patch) | |
| tree | dea0731722ebbde98157f2798d3f33c41f2ded08 /test/components | |
| parent | f58b1790b50abf340d8567b23b329ee9c0c14e3b (diff) | |
| download | mullvadvpn-2c741a45b85ec334c6c09be01f3062065c998265.tar.xz mullvadvpn-2c741a45b85ec334c6c09be01f3062065c998265.zip | |
Fix flow annotations to work on flow v0.66
Diffstat (limited to 'test/components')
| -rw-r--r-- | test/components/Accordion.spec.js | 2 | ||||
| -rw-r--r-- | test/components/Switch.spec.js | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/test/components/Accordion.spec.js b/test/components/Accordion.spec.js index 2357e27dfc..bd69c6a7b5 100644 --- a/test/components/Accordion.spec.js +++ b/test/components/Accordion.spec.js @@ -6,8 +6,6 @@ import React from 'react'; import ReactDOM from 'react-dom'; import Accordion from '../../app/components/Accordion'; -import type { AccordionProps } from '../../app/components/Accordion'; - describe('components/Accordion', () => { let container: ?HTMLElement; diff --git a/test/components/Switch.spec.js b/test/components/Switch.spec.js index db7fe8d8c4..a369ba777c 100644 --- a/test/components/Switch.spec.js +++ b/test/components/Switch.spec.js @@ -1,7 +1,7 @@ // @flow import { expect } from 'chai'; -import React from 'react'; +import * as React from 'react'; import ReactDOM from 'react-dom'; import ReactTestUtils, { Simulate } from 'react-dom/test-utils'; import Switch from '../../app/components/Switch'; @@ -10,7 +10,7 @@ describe('components/Switch', () => { let container: ?HTMLElement; - function renderIntoDocument(instance: React.Element<*>): React.Component<*, *, *> { + function renderIntoDocument(instance: React.Element<*>): React.Component<*, *> { if(container) { throw new Error('Unmount previously rendered component first.'); } @@ -105,6 +105,7 @@ describe('components/Switch', () => { const component = renderIntoDocument( <Switch isOn={ false } onChange={ onChange } /> ); + const domNode = ReactTestUtils.findRenderedDOMComponentWithTag(component, 'input'); Simulate.mouseDown(domNode, { clientX: 100, clientY: 0 }); |
