test: add NotificationListItem component tests#589
Merged
alejandronanez merged 6 commits intomasterfrom Oct 28, 2017
Merged
Conversation
andrewda
previously requested changes
Oct 28, 2017
| expect(result).toBe(TouchableOpacity); | ||
| }); | ||
|
|
||
| it('should call navigation when user press TitleComponent', () => { |
Member
There was a problem hiding this comment.
I would say 'should call navigation when TitleComponent is pressed'. Talking about the user is more appropriate in an E2E test.
Member
There was a problem hiding this comment.
Actually, I take that back. Talking about the user is fine. If you want to do it that way, just switch "press" to "presses".
Member
Author
|
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
100% coverage for

NotificationListItemcomponent