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 toHaveProperty() to use hasOwnProperty from Object #3410

Merged
merged 1 commit into from
Apr 28, 2017

Conversation

thymikee
Copy link
Collaborator

Summary

Fixes #3409.

Test plan

Add new test for object without a prototype.

@codecov-io
Copy link

Codecov Report

Merging #3410 into master will increase coverage by 0.14%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3410      +/-   ##
==========================================
+ Coverage   64.13%   64.28%   +0.14%     
==========================================
  Files         177      176       -1     
  Lines        6553     6540      -13     
  Branches        4        4              
==========================================
+ Hits         4203     4204       +1     
+ Misses       2349     2335      -14     
  Partials        1        1
Impacted Files Coverage Δ
packages/jest-matchers/src/matchers.js 98.35% <100%> (ø) ⬆️
packages/jest-matchers/src/utils.js 100% <100%> (ø) ⬆️
packages/pretty-format/src/index.js 98.06% <0%> (-0.01%) ⬇️
packages/jest-jasmine2/src/index.js 0% <0%> (ø) ⬆️
packages/jest-jasmine2/src/setup-jest-globals.js 0% <0%> (ø) ⬆️
packages/jest-snapshot/src/plugins.js 100% <0%> (ø) ⬆️
packages/jest-cli/src/TestRunner.js 31.32% <0%> (ø) ⬆️
packages/jest-cli/src/reporters/CoverageWorker.js
packages/jest-matcher-utils/src/index.js 98.66% <0%> (+0.05%) ⬆️
...ackages/jest-cli/src/reporters/CoverageReporter.js 60.52% <0%> (+4.71%) ⬆️
... and 1 more

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 acbb907...6f79177. Read the comment docs.

@cpojer cpojer merged commit 8f4fe1e into jestjs:master Apr 28, 2017
@cpojer
Copy link
Member

cpojer commented Apr 28, 2017

Nice one!

@thymikee thymikee deleted the fix-toHaveProperty branch April 28, 2017 11:49
@m1gu3l
Copy link

m1gu3l commented Apr 28, 2017

Thanks

tushardhole pushed a commit to tushardhole/jest that referenced this pull request Aug 21, 2017
@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 13, 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.

toHaveProperty should not rely on input prototype method
5 participants