Experiencing an issue on Vue JS, specifically with a method within a component: https://i.sstatic.net/yAjr0.png
The method loadProducts
is async, and running JEST tests reveals that line 320 is not covered, despite all other lines and code within the function being covered.
When attempting to await and evaluate the function, the result returned is from lines 339 and 343:
const {success} = await wrapper.vm.loadProducts();
A simplified test case that has been created:
describe('loadProducts', () => {
it('should return false', async () => {
const {success} = await wrapper.vm.loadProducts();
expect(success).toEqual(false);
});
);
Looking for advice on how to address the coverage report warning being displayed?