mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-05-28 08:06:19 +00:00
Ensured requests when loading visits are made in parallel for big dataset
This commit is contained in:
@@ -4,6 +4,7 @@ import reducer, {
|
||||
GET_SHORT_URL_VISITS_START,
|
||||
GET_SHORT_URL_VISITS_ERROR,
|
||||
GET_SHORT_URL_VISITS,
|
||||
GET_SHORT_URL_VISITS_LARGE,
|
||||
} from '../../../src/visits/reducers/shortUrlVisits';
|
||||
|
||||
describe('shortUrlVisitsReducer', () => {
|
||||
@@ -15,6 +16,13 @@ describe('shortUrlVisitsReducer', () => {
|
||||
expect(loading).toEqual(true);
|
||||
});
|
||||
|
||||
it('returns loadingLarge on GET_SHORT_URL_VISITS_LARGE', () => {
|
||||
const state = reducer({ loadingLarge: false }, { type: GET_SHORT_URL_VISITS_LARGE });
|
||||
const { loadingLarge } = state;
|
||||
|
||||
expect(loadingLarge).toEqual(true);
|
||||
});
|
||||
|
||||
it('stops loading and returns error on GET_SHORT_URL_VISITS_ERROR', () => {
|
||||
const state = reducer({ loading: true, error: false }, { type: GET_SHORT_URL_VISITS_ERROR });
|
||||
const { loading, error } = state;
|
||||
|
||||
Reference in New Issue
Block a user