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

jest: Regression: Fix mock promises #32898

Closed
wants to merge 1 commit into from
Closed

jest: Regression: Fix mock promises #32898

wants to merge 1 commit into from

Conversation

fgrandel
Copy link

@fgrandel fgrandel commented Feb 8, 2019

Please fill in this template.

  • Use a meaningful title for the pull request. Include the name of the package modified.
  • Test the change in your own code. (Compile and run.)
  • Add or edit tests to reflect the change. (Run with npm test.)
  • Follow the advice from the readme.
  • Avoid common mistakes.
  • Run npm run lint package-name (or tsc if no tslint.json is present).

If changing an existing definition:

fixes #32890
proposal to replace #32816

This is a proposal for an alternative solution to #32816 which might provide better inference. Please feel free to close if you think that #32816 is your preferred choice.

For the commented tests see microsoft/TypeScript#29825

@antoinebrault
Copy link
Contributor

its almost the same as #32816 except that mockRejectValue() argument has to be any type because you want the error as argument, not T type as value. Can you close this PR ?

Thanks for you time reporting bugs. I'm trying to resolve issues ASAP. It's hard to get all use cases the first time without complete unit tests.

@fgrandel
Copy link
Author

fgrandel commented Feb 8, 2019

I'm trying to resolve issues ASAP. It's hard to get all use cases
the first time without complete unit tests.

Yep - your response times are amazing. Thank you so much for your work! :-)

@fgrandel
Copy link
Author

fgrandel commented Feb 8, 2019

Closing as proposed by @antoinebrault in favour of #32816

@fgrandel fgrandel closed this Feb 8, 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.

jest: Regression: mock{Resolved|Rejected}... no longer has the correct return type
2 participants