Skip to content

Commit

Permalink
refactor(ZNTA-1865): Return undefined rather than empty spans
Browse files Browse the repository at this point in the history
Refactor tests to work with components returning undefined
  • Loading branch information
Earl Floden committed Jul 19, 2017
1 parent ffba21c commit 3f755f2
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 11 deletions.
Expand Up @@ -83,9 +83,6 @@ describe('DraggableVersionPanels', () => {
onDraggableMoveEnd={callback}
removeVersion={callback} />
)
const expected = ReactDOMServer.renderToStaticMarkup(
<span></span>
)
expect(actual).toEqual(expected)
expect(actual).toEqual('')
})
})
Expand Up @@ -90,7 +90,7 @@ class DraggableVersionPanels extends Component {
}
render () {
if (this.props.selectedVersions.length === 0) {
return <span></span>
return null
}
return (
<ListGroup>
Expand Down
Expand Up @@ -20,9 +20,6 @@ describe('LockIcon', () => {
const actual = ReactDOMServer.renderToStaticMarkup(
<LockIcon status={'ACTIVE'} />
)
const expected = ReactDOMServer.renderToStaticMarkup(
<span></span>
)
expect(actual).toEqual(expected)
expect(actual).toEqual('')
})
})
Expand Up @@ -18,7 +18,7 @@ const LockIcon = ({status}) => {
<Icon name='locked' className='s0 icon-locked' />
</OverlayTrigger>
)
: <span />
: null
}
LockIcon.propTypes = {
status: entityStatusPropType
Expand Down
Expand Up @@ -437,7 +437,7 @@ class TMMergeModal extends Component {
/>
)
const modalFooter = processStatus
? <span></span>
? undefined
: (
<span>
<Row>
Expand Down

0 comments on commit 3f755f2

Please sign in to comment.