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 getting function name for rare cases #8362

Merged
merged 2 commits into from Apr 23, 2019

Conversation

Projects
None yet
4 participants
@Connormiha
Copy link
Contributor

commented Apr 22, 2019

Summary

Helper for getting function name in some cases returns wrong function name.
For example: If we somehow lost the property name in function, then we used regExp that failed with async function, function generator and function with $ in name.
One more rare case if toString method was changed.

Test plan

I added tests for these cases

@codecov-io

This comment has been minimized.

Copy link

commented Apr 22, 2019

Codecov Report

Merging #8362 into master will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #8362      +/-   ##
==========================================
+ Coverage   62.27%   62.29%   +0.02%     
==========================================
  Files         266      266              
  Lines       10728    10729       +1     
  Branches     2609     2608       -1     
==========================================
+ Hits         6681     6684       +3     
+ Misses       3462     3460       -2     
  Partials      585      585
Impacted Files Coverage Δ
packages/expect/src/jasmineUtils.ts 91.22% <100%> (+1.84%) ⬆️

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 7e1e3f8...c2eaf62. Read the comment docs.

@SimenB

SimenB approved these changes Apr 23, 2019

Copy link
Collaborator

left a comment

Thanks!

@SimenB SimenB merged commit 20ba4be into facebook:master Apr 23, 2019

0 of 10 checks passed

ci/circleci: lint-and-typecheck CircleCI is running your tests
Details
ci/circleci: test-browser CircleCI is running your tests
Details
ci/circleci: test-jest-circus Your tests are queued behind your running builds
Details
ci/circleci: test-node-10 CircleCI is running your tests
Details
ci/circleci: test-node-11 CircleCI is running your tests
Details
ci/circleci: test-node-6 CircleCI is running your tests
Details
ci/circleci: test-node-8 CircleCI is running your tests
Details
ci/circleci: test-or-deploy-website CircleCI is running your tests
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
deploy/netlify Deploy preview processing.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.