Swap out github.com/matryer/is with internal implementation #86
matthewmueller
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
https://github.com/matryer/is is wonderfully simple, but almost too simple. I'm finding myself needing a
.Contains
equivalent more times than not. The best way to do a contains currently is:This isn't great because while it tells you an error occurred on that line, it doesn't tell you the values of actual and expect.
To summarize,
What I love:
What I don't really like:
Proposal
is.In(actual, expect)
(aka.Contains()
)Beta Was this translation helpful? Give feedback.
All reactions