From bf913012c559a513719f2a88f8dade2f23a76cc2 Mon Sep 17 00:00:00 2001 From: Katie Rischpater <98350084+the-bay-kay@users.noreply.github.com> Date: Thu, 9 Nov 2023 14:39:12 -0800 Subject: [PATCH] Minor adjustment to tests --- www/__mocks__/timelineHelperMocks.ts | 8 +------- www/__tests__/timelineHelper.test.ts | 4 ++-- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/www/__mocks__/timelineHelperMocks.ts b/www/__mocks__/timelineHelperMocks.ts index 53d687968..eb0eb672e 100644 --- a/www/__mocks__/timelineHelperMocks.ts +++ b/www/__mocks__/timelineHelperMocks.ts @@ -110,13 +110,7 @@ export const fakeEndTsOne = -13885091; export const fakeStartTsTwo = 1092844665; export const fakeEndTsTwo = 1277049465; -export const readAllCheck = [ - { - ...mockData.phone_data[0].data, - }, -]; - -export const readAllCompositeCheck = [ +export const readAllCheckOne = [ { additions: [], cleaned_section_summary: null, diff --git a/www/__tests__/timelineHelper.test.ts b/www/__tests__/timelineHelper.test.ts index e0f424fcf..e5e37ca2d 100644 --- a/www/__tests__/timelineHelper.test.ts +++ b/www/__tests__/timelineHelper.test.ts @@ -31,7 +31,7 @@ it('works when there are no composite trip objects fetched', async () => { it('fetches a composite trip object and collapses it', async () => { expect(readAllCompositeTrips(mockTLH.fakeStartTsOne, mockTLH.fakeEndTsOne)).resolves.toEqual( - mockTLH.readAllCompositeCheck, + mockTLH.readAllCheckOne, ); expect( readAllCompositeTrips(mockTLH.fakeStartTsTwo, mockTLH.fakeEndTsTwo), @@ -47,7 +47,7 @@ jest.mock('../js/unifiedDataLoader', () => ({ })); it('works when there are no unprocessed trips...', async () => { - expect(readUnprocessedTrips(-1, -1, null)).resolves.not.toThrow(); + expect(readUnprocessedTrips(-1, -1, null)).resolves.toEqual([]); }); it('works when there are one or more unprocessed trips...', async () => {