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
Contains*-Assertions panic when a nil instead of a string, slice, map etc. is injected.
Minimal example here:
varmyMapmap[string]interface{} // empty// try an assertion on nested keys// which effectively leads to a passing of nilrequire.Contains(t, myMap["some-key"], "expected-nested-key") // <-- panic
Assertions should be robust against nil-injection and gracefully fail instead of panicking.
The text was updated successfully, but these errors were encountered:
Contains*-Assertions panic when a
nil
instead of a string, slice, map etc. is injected.Minimal example here:
Assertions should be robust against nil-injection and gracefully fail instead of panicking.
The text was updated successfully, but these errors were encountered: