Skip to content

Commit

Permalink
Merge pull request #19429 from qmonmert/vue18567-4
Browse files Browse the repository at this point in the history
[Vue] Increase Vue code coverage
  • Loading branch information
DanielFran authored Aug 15, 2022
2 parents a20cdd7 + bff776a commit 98269fd
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,17 @@ describe('Axios errors interceptor', () => {
expect(callback.called).toBeTruthy();
}
});
it('should not use callback for errors different 50x, 401, 403', async () => {
const callback = sinon.spy();

setupAxiosConfig.setupAxiosInterceptors(() => {}, callback);

try {
mock.onGet().reply(402);
await axios('/api/test');
} catch {
expect(callback.called).toBeFalsy();
}
});
});

0 comments on commit 98269fd

Please sign in to comment.