mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-03-10 09:33:51 +00:00
Added meaningful error messages for the rest of API calls
This commit is contained in:
@@ -103,7 +103,7 @@ describe('shortUrlVisitsReducer', () => {
|
||||
beforeEach(() => dispatchMock.mockReset());
|
||||
|
||||
it('dispatches start and error when promise is rejected', async () => {
|
||||
const ShlinkApiClient = buildApiClientMock(Promise.reject() as any);
|
||||
const ShlinkApiClient = buildApiClientMock(Promise.reject({}));
|
||||
|
||||
await getShortUrlVisits(() => ShlinkApiClient)('abc123')(dispatchMock, getState);
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ describe('tagVisitsReducer', () => {
|
||||
beforeEach(jest.resetAllMocks);
|
||||
|
||||
it('dispatches start and error when promise is rejected', async () => {
|
||||
const ShlinkApiClient = buildApiClientMock(Promise.reject());
|
||||
const ShlinkApiClient = buildApiClientMock(Promise.reject({}));
|
||||
|
||||
await getTagVisits(() => ShlinkApiClient)('foo')(dispatchMock, getState);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user