-
Notifications
You must be signed in to change notification settings - Fork 4
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
Use callback for refs and use enzyme #54
Conversation
All tests are passing now. We may want to rethink the tests where I had to call We shouldn't be essentially retesting react. |
test/markdown-editor-test.jsx
Outdated
import { MarkdownEditor } from '../src/index'; | ||
|
||
function mockTextarea() { | ||
const mockTextarea = () => { |
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'm not sure why this is assigning an anonymous function to a variable, rather than just declaring mockTextArea
as a function.
One small comment about declaring a function. Otherwise, looks good. |
@eatyourgreens that was me trying to figure out why it was a function in the first place and making it an object and then figuring out that it needed to be one for some of the tests. Should be good to go now. |
By the way, I've included this update in https://react-15.pfe-preview.zooniverse.org/ |
This updates the editor to use a callback rather than the string literal for refs. The way the tests were written depended on a string ref, so I went through and converted the tests to use enzyme which has a much nicer test API. All but three tests are passing, so I hope to get to this during down time this week.