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

td.matchers.contains blows up on sparse matches #56

Closed
searls opened this issue Nov 25, 2015 · 0 comments
Closed

td.matchers.contains blows up on sparse matches #56

searls opened this issue Nov 25, 2015 · 0 comments
Labels

Comments

@searls
Copy link
Member

searls commented Nov 25, 2015

Just noticed this while writing docs:

matcher = td.matchers.contains({container: {size: 'S'}})

matcher.__matches({}) // blows up, can't check 'size' of undefined
matcher.__matches({container: {}}) // false does not blow up

We need to make sure that the contains matcher doing the deep object search fails fast when an intermediate property is absent

@searls searls added the bug label Nov 25, 2015
@searls searls closed this as completed in 95191e2 Nov 25, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant