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

toContainAllKeys will pass when tested against an empty object #119

Closed
LucianBuzzo opened this issue Apr 17, 2018 · 1 comment
Closed

toContainAllKeys will pass when tested against an empty object #119

LucianBuzzo opened this issue Apr 17, 2018 · 1 comment

Comments

@LucianBuzzo
Copy link
Contributor

LucianBuzzo commented Apr 17, 2018

Bug

  • package version: 0.6.0
  • node version: 9.6.1
  • npm version: 5.6.0

toContainAllKeys will always pass when testing an empty object.
Here's a simple example to reproduce the issue.

test('toContainAllKeys should fail', () => {
  expect({}).toContainAllKeys(['foo'])
})

I'll open a PR to fix this shortly

mattphillips pushed a commit that referenced this issue Apr 19, 2018
* Fix bugs in `toContainAllKeys` matcher

Connects to #119
Connects to #121

* Fix broken snapshot
@mattphillips
Copy link
Member

👍

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

No branches or pull requests

2 participants