api-boltAPIBolt

Cookies Assertions

Verify Set-Cookie boundaries directly from the generic expect() root sequence.

Available Matchers

toExistCookie(key)

Validates that a cookie with the specified name key was set during the response cycle.

ts
ab.expect('Session Issued').toExistCookie('session_id');

toBeCookie(key, exactValue)

Asserts the retrieved cookie value strictly equals the provided literal.

ts
ab.expect('Flags match').toBeCookie('opt_in', 'true');
Looking for deep security audits of cookies like toBeSecure() or toHaveDomain()? Drop down to the Classic Cookies API which provides exhaustive attributes testing.