sameAs function
Asserts that for a key x, the value of x is equal to the value for key.
Implementation
ContextAwareMatcher sameAs(String key) {
return predicateWithContext(
(item, key, context, matchState) {
return equals(item).matches(context[key], matchState);
},
'is equal to the value of "$key"',
);
}