Skip to content

Commit

Permalink
Minor adjustment to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
the-bay-kay committed Nov 9, 2023
1 parent 2d0d321 commit bf91301
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
8 changes: 1 addition & 7 deletions www/__mocks__/timelineHelperMocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions www/__tests__/timelineHelper.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand All @@ -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 () => {
Expand Down

0 comments on commit bf91301

Please sign in to comment.