From 478fc1878b4a419100b31d10cbc48786c67146c1 Mon Sep 17 00:00:00 2001 From: Jack Greenlee Date: Tue, 10 Dec 2024 15:28:50 -0500 Subject: [PATCH] for timelineHelper test, put mockTransitions in reverse order When the usercache is queried, it returns entries in reverse chronological order; the mock should reflect this so the test ensures they are sorted correctly. It would have helped us catch https://github.com/e-mission/e-mission-phone/pull/1189 sooner. --- www/__mocks__/timelineHelperMocks.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/www/__mocks__/timelineHelperMocks.ts b/www/__mocks__/timelineHelperMocks.ts index 66011c4dd..ecee21ec5 100644 --- a/www/__mocks__/timelineHelperMocks.ts +++ b/www/__mocks__/timelineHelperMocks.ts @@ -165,19 +165,19 @@ export const mockCompDataTwo = { export const mockTransitions: Array> = [ { data: { - // mock of a startTransition + // mock of an endTransition currstate: '', - transition: 'T_EXITED_GEOFENCE', - ts: 1, + transition: 'T_TRIP_ENDED', + ts: 9999, }, metadata: mockMetaData, }, { data: { - // mock of an endTransition + // mock of a startTransition currstate: '', - transition: 'T_TRIP_ENDED', - ts: 9999, + transition: 'T_EXITED_GEOFENCE', + ts: 1, }, metadata: mockMetaData, },