Skip to content
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

Add dom testing library #93

Merged
merged 4 commits into from
Mar 19, 2019

Conversation

CarsonMcKinstry
Copy link

Reference issue: #83

What changed in this PR:

In order to allow melody-test-utils to simulate most events properly, Kent C Dodd's dom-testing-library has been added and replaces the Event constructor in Wrapper.simulate. This will allow for keyboard and input events to be simulated properly, including being able to test for proper handling of event.target.value.

@@ -0,0 +1,3 @@
<div>
<input type="text" ref="{{ input }}" value="{{ value }}"/>
</div>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're missing a newline here. :)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be fixed in the latest commit!

@pago
Copy link
Contributor

pago commented Jan 15, 2019

dom-testing-library looks pretty amazing. Thank you for setting this up. There's one whitespace missing. Once its there I'll merge it in.

@pago
Copy link
Contributor

pago commented Jan 17, 2019

I just noticed that dom-testing-library requires node 8 or later. We currently support node 6 or later (that's why the builds fail).
Let me check if we can drop node 6 support already. Otherwise we'd need to make it an optional dependency and throw if not supported. Or skip the test for it if node <= 6.

@CarsonMcKinstry
Copy link
Author

Interesting. I guess I got it installed just fine with node 10 and then only did testing with 6+ (didn't re-install).

Let me know what you decide in concerns to node 6 and I can update this PR if need be!

@pago pago merged commit f3d6d1e into trivago:add-test-utils Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants