when i run my function it gives me error : Resolution method is overspecified. Specify a callback *or* return a Promise; not both.
can anyone please check my code, and help to resolve this issue ? here i have placed my full code
it('Get Organizations', async function (done) {
let user_permission = await commonService.getuserPermission(logged_in_user_id,'organizations','findAll');
let api_status = 404;
if(user_permission) {
api_status = 200;
}
let current_token = currentResponse['token'];
old_unique_token = current_token;
chai.request(app)
.post('entities')
.set('Content-Type', 'application/json')
.set('vrc-access-token', current_token)
.send({ "key": "organizations", "operation": "findAll" })
.end(function (err, res) {
currentResponse = res.body;
expect(err).to.be.null;
expect(res).to.have.status(api_status);
done();
});
});