mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-03-14 11:33:51 +00:00
Ensured new visits are prepended and not appended, ensuring they keep the proper order
This commit is contained in:
@@ -64,7 +64,7 @@ describe('orphanVisitsReducer', () => {
|
||||
expect(visits).toEqual(actionVisits);
|
||||
});
|
||||
|
||||
it('appends a new visits on CREATE_VISIT', () => {
|
||||
it('prepends new visits on CREATE_VISIT', () => {
|
||||
const prevState = buildState({ visits: visitsMocks });
|
||||
|
||||
const { visits } = reducer(
|
||||
@@ -72,7 +72,7 @@ describe('orphanVisitsReducer', () => {
|
||||
{ type: CREATE_VISITS, createdVisits: [{ visit: {} }, { visit: {} }] } as any,
|
||||
);
|
||||
|
||||
expect(visits).toEqual([ ...visitsMocks, {}, {}]);
|
||||
expect(visits).toEqual([{}, {}, ...visitsMocks ]);
|
||||
});
|
||||
|
||||
it('returns new progress on GET_ORPHAN_VISITS_PROGRESS_CHANGED', () => {
|
||||
|
||||
Reference in New Issue
Block a user