getCookie = function (jar, url, key) {
        var cookies = jar.getCookies(url);
        for(var ct = 0; ct < cookies.length; ct++) {
            if(cookies[ct].key === key) {
                return cookies[ct];
            }
        }
        return null;
    }
Either checks that a cookie exists or ensures the cookie matches a given value
@alias module:chakram-expectation.cookie
@param {String} name - checks a cookie with this name exists
@param {String | RegExp} [value] - if specified, checks the cookie matches the given string or regular expression
@example 
it("should allow checking of HTTP cookies", function () {
    var response = chakram.get("http://httpbin.org/cookies/set?chakram=testval");
    expect(response).to.have.cookie('chakram');
    expect(response).to.have.cookie('chakram', 'testval');
    expect(response).to.have.cookie('chakram', /val/);
    return chakram.wait();
});