mirror of https://github.com/stretchr/testify.git
`MapIndex` returns a zero `reflect.Value` if the map value does not exist. This now aligns more closely with `InDeltaMapValues` by checking `reflect/Value.IsValid`. The use of `recover()` was hiding this error by setting the result of the test to be "false" despite the test suite passing. This led to flapping tests where they would succeed if the panic occurred on a missing key before comparing key values that didn't match! I've ensured the test suite now asserts on the expected error message and added another example where the subset has keys not found on the map under test. |
||
---|---|---|
.. | ||
assertion_compare.go | ||
assertion_compare_can_convert.go | ||
assertion_compare_go1.17_test.go | ||
assertion_compare_legacy.go | ||
assertion_compare_test.go | ||
assertion_format.go | ||
assertion_format.go.tmpl | ||
assertion_forward.go | ||
assertion_forward.go.tmpl | ||
assertion_order.go | ||
assertion_order_test.go | ||
assertions.go | ||
assertions_test.go | ||
doc.go | ||
errors.go | ||
forward_assertions.go | ||
forward_assertions_test.go | ||
http_assertions.go | ||
http_assertions_test.go |