vlucas / frisby

Frisby is a REST API testing framework built on Jest that makes testing API endpoints easy, fast, and fun.

Home Page:http://frisbyjs.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Request Object not being modified outside of req.body and req.headers

JoshuaConcon opened this issue · comments

Node Version: v8.9.4
Frisby Version: 2.0.16

I'm having a problem where if I set the property req.cookies to something on frisby, those changes don't seem to be reflected in the endpoint being tested, only changes with regards to req.headers and req.body are made.

I have tried to change it as such:

frisby.setup({
    request: {
        cookies: data
    }
})
.post(url, { body })

and

frisby.post(url, { body, cookies: data })

and

frisby.setup({
    cookies: data
})
.post(url, { body })

With no luck.

Please and Thank You

@JoshuaConcon

Please use as follows:

headers: {
  cookies: data
}