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

feat: refactor test #286

Merged
merged 2 commits into from
Feb 8, 2019
Merged

feat: refactor test #286

merged 2 commits into from
Feb 8, 2019

Conversation

marcobiedermann
Copy link
Contributor

What:

Small refactoring of end-to-end testing.

Why:

Clean code is better code :)

How:

Since both conditions have a following return value, this could be shortened by using short circuit return statements.

Checklist:

  • Documentation
  • Tests
  • Ready to be merged
  • Added myself to contributors table

use shortcircut return statement
add myself to all contributors
Copy link
Member

@kentcdodds kentcdodds left a comment

Choose a reason for hiding this comment

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

I personally prefer the else 🤷‍♂️

But I'm fine with this change. Thanks!

@kentcdodds kentcdodds merged commit 1d45c5c into testing-library:master Feb 8, 2019
@marcobiedermann marcobiedermann deleted the feature/refactor branch February 8, 2019 19:47
@kentcdodds
Copy link
Member

🎉 This PR is included in version 5.5.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

lucbpz pushed a commit to lucbpz/react-testing-library that referenced this pull request Jul 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants