to please Sonar
Issue-ID: CLAMP-806
Signed-off-by: JulienBe <jb379x@att.com>
Change-Id: Ia09874acfa7237f0a920f0327e6e2d76eb61fb2a
it('Test API Rejection', () => {
const myMockFunc = fetch.mockImplementationOnce(() => Promise.reject('error'));
setTimeout( () => myMockFunc().catch(e => {
it('Test API Rejection', () => {
const myMockFunc = fetch.mockImplementationOnce(() => Promise.reject('error'));
setTimeout( () => myMockFunc().catch(e => {
it('Test API Rejection', () => {
const myMockFunc = fetch.mockImplementationOnce(() => Promise.reject('error'));
setTimeout( () => myMockFunc().catch(e => {
it('Test API Rejection', () => {
const myMockFunc = fetch.mockImplementationOnce(() => Promise.reject('error'));
setTimeout( () => myMockFunc().catch(e => {
expect(historyMock.push.mock.calls[0]).toEqual([ '/']);
handleClose.mockClear();
});
expect(historyMock.push.mock.calls[0]).toEqual([ '/']);
handleClose.mockClear();
});
- });
\ No newline at end of file
setTimeout(
() =>
myMockFunc().catch(e => {
setTimeout(
() =>
myMockFunc().catch(e => {
expect(historyMock.push.mock.calls[0]).toEqual([ '/']);
handleClose.mockClear();
});
expect(historyMock.push.mock.calls[0]).toEqual([ '/']);
handleClose.mockClear();
});
-});
\ No newline at end of file