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

Fix jest crashing when potentialError is null #7049

Merged
merged 2 commits into from
Sep 26, 2018
Merged

Conversation

natealcedo
Copy link
Contributor

@natealcedo natealcedo commented Sep 26, 2018

Summary

This PR fixes the scenario where a test returns a promise which rejects to null.

Fixes #6896
Closes #6897

Test plan

An end to end test has been added to test for this scenario.
Note that the test assertion has two cases due to jest-jasmine and jest-circus returning different outputs for this case.

Edit:
Acknowledging @Pajn here for the work he has done in #6897.
Just noting that #6897 should also be closed when this PR is accepted.

@codecov-io
Copy link

codecov-io commented Sep 26, 2018

Codecov Report

Merging #7049 into master will not change coverage.
The diff coverage is 0%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #7049   +/-   ##
=======================================
  Coverage   66.86%   66.86%           
=======================================
  Files         250      250           
  Lines       10460    10460           
  Branches        3        4    +1     
=======================================
  Hits         6994     6994           
  Misses       3465     3465           
  Partials        1        1
Impacted Files Coverage Δ
packages/jest-jasmine2/src/is_error.js 0% <0%> (ø) ⬆️

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 0cd757b...fe82d43. Read the comment docs.

Copy link
Member

@SimenB SimenB left a comment

Choose a reason for hiding this comment

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

This is great, thank you!

@SimenB SimenB merged commit 2b216e4 into jestjs:master Sep 26, 2018
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crash when potentialError is null
4 participants