Closed amitguptagwl closed 6 years ago
I've tried 3 ways and only 1 works out of them.
var request = httpMocks.createRequest({ url: '/test/val', cookies: ["alpha=gamma","alpha=beta"],//doesn't work headers: { "cookie" : "foo=bar; Expires=Tue, 15 Mar 2016 21:47:38 GMT;", "header2" : "val2" } }); request._setCookiesVariable("alpha","gamma");//doesn't work request._setCookiesVariable("alpha","beta");//doesn't work
So which is the proper way of setting the cookie to the mocked request?
This works for me:
const req = httpMocks.createRequest({ cookies: { 'alpha': 'gamma', 'beta': 'lambda' } });
I've tried 3 ways and only 1 works out of them.
So which is the proper way of setting the cookie to the mocked request?