-
Notifications
You must be signed in to change notification settings - Fork 142
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
matchers.contains(number) support #102
Comments
Ah, the issue is that you're saying that |
It makes perfect sense to me. Here's two examples. The ONLY difference is replacing the string
|
Ugh, I really apologize. I shot from the hip and speculated when I replied above because I was on a machine without a dev environment, but now that I can test it out locally you're completely write. The truth is this feature doesn't work how I thought it did. I'm sort of annoyed with myself for not finding this API quirk before going 1.0, because it's not how I want it, but it's also not worth breaking backwards-compatibility. Naturally, this mistake means I need to accept any kind of input, including |
Yeah I can give it some more thought in terms of what the ideal API/behavior would be, but I think at the moment it's not self-consistent. Could go more explicit and tighter matching or more loose and flexible matching I guess. |
Thanks a lot to @focusaurus for his patience!
Check out the update in 1.4.2 and let me know if that works for you |
Yes, no more exception! Thanks for the quick fix. Been getting a lot of mileage out of testdouble recently. |
Given this repro snippet
I'd like this to succeed, but currently it throws an exception "Error: Error: testdouble.js - td.matchers.contains - this matcher only supports strings, arrays, and plain objects"
I think to fix this is just a matter of
or _.isNumber(containing)
ontestdouble.js/src/matchers/index.coffee
Line 45 in 30e27f5
The text was updated successfully, but these errors were encountered: