amireh / amireh/react-drill

hasProp matcher doesn't allow for object equality

Open
#13 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
18
Forks
8
PR merge metrics
No merged PRs in 30d

Description

Given the following Subject, using the hasProp matcher will return false when providing an equivalent object. This is because the matcher looks for strict equality over object equality.
```javascript

drill(Subject)
.find(MyComponent, m.hasProp('prop', { foo: 'bar' })) // => false

{ foo: 'bar' } === { foo: 'bar' } // => false
_.isEqual({ foo: 'bar' }, { foo: 'bar' }) // => true
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.