hasCookie function

Matcher hasCookie(
  1. String name, [
  2. Object? valueMatcher
])

Matches a response that has a Set-Cookie header with the given name.

Example:

expect(res, hasCookie('session'));
expect(res, hasCookie('token', 'abc123'));

Implementation

Matcher hasCookie(String name, [Object? valueMatcher]) =>
    _CookieMatcher(name, valueMatcher);