isDeepEq<T> function
Checks whether the given value is equal to the otherValue
value of type T
Implementation
IValidator isDeepEq<T>(T otherValue, {String? message}) =>
isType<T>() &
validator(
(value) => _collectionEquals(value, otherValue),
(value) => Expectation(
message: message ?? 'equal to ${prettifyValue(otherValue)}',
value: value,
code: ExpectationCodes.valueDeepEqualMismatch,
data: {
'expected': prettifyValue(otherValue),
'found': prettifyValue(value),
'mode': 'deep'
},
),
);