Open
Conversation
added 2 commits
April 24, 2020 17:58
…t-testing-library-training into feature/issue#21-events-onsubmit
dailymp
requested changes
Apr 27, 2020
Owner
dailymp
left a comment
There was a problem hiding this comment.
Just some minor details to fix here, good work! :)
| import { mount } from 'enzyme'; | ||
| import { NameForm } from './NameForm'; | ||
| import { configure } from 'enzyme'; | ||
| import Adapter from 'enzyme-adapter-react-16'; |
Owner
There was a problem hiding this comment.
We can declare an configure adapter in config files instead of declare inside each test file separated
| @@ -0,0 +1,42 @@ | |||
| import React from 'react'; | |||
|
|
|||
|
|
|||
| this.handleSubmit = this.handleSubmit.bind(this); | ||
| } | ||
|
|
||
| handleChange(event) { |
Owner
There was a problem hiding this comment.
If you convert this to lambda function then the line 13 can be deleted, and it is less code! Try it!
Collaborator
Author
There was a problem hiding this comment.
I don't really know what do you mean.
| this.setState({ value: event.target.value }); | ||
| } | ||
|
|
||
| handleSubmit(event) { |
Owner
There was a problem hiding this comment.
If you convert this to lambda function then the line 14 can be deleted, and it is less code! Try it!
Collaborator
Author
There was a problem hiding this comment.
I don't really know what do you mean.
|
|
||
| import {NameForm} from './NameForm/NameForm'; | ||
|
|
||
|
|
added 2 commits
April 29, 2020 09:16
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.
@dailymp @mathewamg33 @reginafernandezpinar