Skip to content
This repository has been archived by the owner on Sep 10, 2022. It is now read-only.

Commit

Permalink
Removed explicit Nothing.displayName in favor of the inferred name (#415
Browse files Browse the repository at this point in the history
)
  • Loading branch information
Andarist authored and istarkov committed Jul 3, 2017
1 parent de2db67 commit 90e4453
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 5 additions & 1 deletion src/packages/recompose/__tests__/renderNothing-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ import { renderNothing } from '../'
test('renderNothing returns a component that renders null', () => {
const Nothing = renderNothing('div')
const wrapper = shallow(<Nothing />)

const Parent = () => <Nothing />
const parentWrapper = shallow(<Parent />)

expect(wrapper.type()).toBe(null)
expect(Nothing.displayName).toBe('Nothing')
expect(parentWrapper.text()).toBe('<Nothing />')
})
2 changes: 0 additions & 2 deletions src/packages/recompose/renderNothing.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ class Nothing extends Component {
}
}

Nothing.displayName = 'Nothing'

const renderNothing = _ => Nothing

export default renderNothing

0 comments on commit 90e4453

Please sign in to comment.