Hello I am writing unit test case of my function which is like
const Services = {
test: async (token) => {
.. ...
}
}
I have written unit test of this function, report says test covered all lines of this function but async (token) => {
shows in yellow background in report which means uncovered branch.
it("test return 200", async () => {
nock(url)
.get('/test')
.reply(200, response);
const res = await connector.Services.test(token);
res.should.have.property('name');
});
Does anyone know what could be the issue ?