You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now, the test case is that, other than test_key, it should be empty or not exists.
if I try something like this Expect(tc).To(HaveKeyWithValue(Not(Equal("test_key")), BeEmpty())), it will not match if there is no other key than the test key.
Currently, I'm doing this for a composed matcher, so, that solution seems good enough. But I think I'll ask anyway to see if there is anything I miss or that might be a possible improvement.
Thanks!
The text was updated successfully, but these errors were encountered:
Hi!
My usecase for this is to have a default matching value for map's key.
Now, the test case is that, other than
test_key
, it should be empty or not exists.if I try something like this
Expect(tc).To(HaveKeyWithValue(Not(Equal("test_key")), BeEmpty()))
, it will not match if there is no other key than the test key.Currently I'm using this matcher for that case
Currently, I'm doing this for a composed matcher, so, that solution seems good enough. But I think I'll ask anyway to see if there is anything I miss or that might be a possible improvement.
Thanks!
The text was updated successfully, but these errors were encountered: