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

"error": "unsupported_grant_type"

amrsa1 opened this issue · comments

im trying to perform specific test but in mot getting same results like in postman

i think im missing something in my code

image

`const frisby = require('frisby');

describe('Login Test suite',()=>{
it('1- Verify status code is 400 with invaid login credential', (callback)=> {
return frisby
.setup({
request: {
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}
}
})
.post('https://pentestapi.trackerproducts.com/Token',{
grant_type: "password",
username: "username",
password: "mypass"
})
.expect('status',200);
callback();
})

});`

solved by setting qs.stringfy thx