Open amesinp opened 4 years ago
I am currently achieving this by initializing the request then modifying the method before sending. Something like this:
const request = chai.request(app) .get(url) .set('Authorization', bearerToken); request.method = newMethod; const response = await request.send(data);
I am wondering if there is a better way to go about this.
Thank you
Can't we do chai.request(app)[newMethod](url).send(data)?
chai.request(app)[newMethod](url).send(data)
I am currently achieving this by initializing the request then modifying the method before sending. Something like this:
I am wondering if there is a better way to go about this.
Thank you