-
Notifications
You must be signed in to change notification settings - Fork 783
test: add NotificationListItem component tests #589
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tiny change, then LGTM 👍 🎉
expect(result).toBe(TouchableOpacity); | ||
}); | ||
|
||
it('should call navigation when user press TitleComponent', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would say 'should call navigation when TitleComponent is pressed
'. Talking about the user is more appropriate in an E2E test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, I take that back. Talking about the user is fine. If you want to do it that way, just switch "press" to "presses".
Oh. Makes sense. Will update 😎 thanks!
…On Sat, Oct 28, 2017 at 11:47 AM Andrew Dassonville < ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In __tests__/tests/components/NotificationListItem.js
<#589 (comment)>:
> + it("should render a TouchableOpacity component if notification type is not 'Commit'", () => {
+ const notification = {
+ subject: {
+ type: 'not a commit',
+ },
+ };
+ const wrapper = shallow(
+ <NotificationListItem {...defaultProps} notification={notification} />
+ );
+
+ const result = wrapper.instance().getComponentType();
+
+ expect(result).toBe(TouchableOpacity);
+ });
+
+ it('should call navigation when user press TitleComponent', () => {
Actually, I take that back. Talking about the user is fine. If you want to
do it that way, just switch "press" to "presses".
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#589 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAcYUq8dF0zmR9VTXSrOLD2pACP016hrks5sw1qsgaJpZM4QIcf4>
.
|
Already addressed the typo. Waiting for green build to merge.
100% coverage for

NotificationListItem
component