Skip to content

feat(waitFor): improve error message for non-function callbacks #515

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

Merged
merged 2 commits into from
Mar 31, 2020

Conversation

Belco90
Copy link
Member

@Belco90 Belco90 commented Mar 31, 2020

What:
Closes #509

Why:
To improve error message and error stack trace

How:
Checking if callback is a function.

Checklist:

@Belco90 Belco90 requested review from kentcdodds and eps1lon March 31, 2020 09:38
@codesandbox-ci
Copy link

codesandbox-ci bot commented Mar 31, 2020

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 05aa661:

Sandbox Source
flamboyant-goodall-tpbhk Configuration

@codecov
Copy link

codecov bot commented Mar 31, 2020

Codecov Report

Merging #515 into master will not change coverage by %.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #515   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           23        23           
  Lines          426       428    +2     
  Branches       101       102    +1     
=========================================
+ Hits           426       428    +2     
Impacted Files Coverage Δ
src/wait-for.js 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f3f84ce...05aa661. Read the comment docs.

eps1lon
eps1lon previously approved these changes Mar 31, 2020
Copy link
Member

@eps1lon eps1lon left a comment

Choose a reason for hiding this comment

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

Looks good. Just some minor nitpicks.

@eps1lon eps1lon merged commit 672f231 into master Mar 31, 2020
@eps1lon eps1lon deleted the pr/improve-wait-for-cb-error-message branch March 31, 2020 10:22
@eps1lon
Copy link
Member

eps1lon commented Mar 31, 2020

@Belco90 Looking good, thanks!

@kentcdodds
Copy link
Member

🎉 This PR is included in version 7.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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.

Improve error message for non-function arg passed to waitFor
4 participants