I am facing above error with the help of supertest and mocha. I had tried with done as well as timeout but still i facing another issue i attched my code please check and let me know ......
it('/LDAP/Registration',async() => {
await request(app)
.post('/api/v1/LDAP/Registration')
.send({
"ldapregistration": {
"serverhostname":"18.00.00.00",
"serverport":"389",
"domain":"abcd.test",
"adminusername":"abcd@abcd.test",
"adminpassword":"user@123",
"issslselected" : "false"
}
}
)
.set('sessionId' , accesstoken)
.set('Accept', 'application/json')
// .expect('Content-Type', /json/)
}).timeout(10000);
2.with the help of done
it('/LDAP/Registration',(done) => {
this.timeouts(300000)
await request(app)
.post('/api/v1/LDAP/Registration')
.send({
"ldapregistration": {
"serverhostname":"18.00.00.0",
"serverport":"389",
"domain":"abcd.test",
"adminusername":"abdc@abcd.test",
"adminpassword":"user@123",
"issslselected" : "false"
}
}
)
.set('sessionId' , accesstoken)
.set('Accept', 'application/json')
// .expect('Content-Type', /json/)
});
only error is removed by using done() but that function is not calling and code coverage also not increase
I am facing above error with the help of supertest and mocha. I had tried with done as well as timeout but still i facing another issue i attched my code please check and let me know ......
it('/LDAP/Registration',async() => {
await request(app)
.post('/api/v1/LDAP/Registration')
.send({
"ldapregistration": {
"serverhostname":"18.00.00.00",
"serverport":"389",
"domain":"abcd.test",
"adminusername":"abcd@abcd.test",
"adminpassword":"user@123",
"issslselected" : "false"
}
}
)
.set('sessionId' , accesstoken)
.set('Accept', 'application/json')
// .expect('Content-Type', /json/)
}).timeout(10000);
2.with the help of done
it('/LDAP/Registration',(done) => {
this.timeouts(300000)
await request(app)
.post('/api/v1/LDAP/Registration')
.send({
"ldapregistration": {
"serverhostname":"18.00.00.0",
"serverport":"389",
"domain":"abcd.test",
"adminusername":"abdc@abcd.test",
"adminpassword":"user@123",
"issslselected" : "false"
}
}
)
.set('sessionId' , accesstoken)
.set('Accept', 'application/json')
// .expect('Content-Type', /json/)
});
only error is removed by using done() but that function is not calling and code coverage also not increase