Skip to content

Commit

Permalink
Added passing test from reduxjs#395
Browse files Browse the repository at this point in the history
  • Loading branch information
jimbolla authored and aikoven committed Nov 21, 2016
1 parent a4c983c commit 03013b5
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/components/connect.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1862,5 +1862,18 @@ describe('React', () => {

ReactDOM.unmountComponentAtNode(div)
})

it('should allow custom displayName', () => {
// TODO remove __ENABLE_SECRET_EXPERIMENTAL_FEATURES_DO_NOT_USE_OR_YOU_WILL_BE_FIRED once approved
@connect(null, null, null, { getDisplayName: name => `Custom(${name})`, __ENABLE_SECRET_EXPERIMENTAL_FEATURES_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: true })
class MyComponent extends React.Component {
render() {
return <div></div>
}
}

expect(MyComponent.displayName).toEqual('Custom(MyComponent)')
})

})
})

0 comments on commit 03013b5

Please sign in to comment.