Skip to content

Commit

Permalink
Merge branch 'service_rewrite_2023' of https://github.com/e-mission/e…
Browse files Browse the repository at this point in the history
…-mission-phone into migration-wrapup
  • Loading branch information
JGreenlee committed Jan 25, 2024
1 parent 316d4e9 commit d5fe4b4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion www/__mocks__/timelineHelperMocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export const mockUnprocessedTrip: UnprocessedTrip = {
user_input: null,
};

export const mockCompData = {
export const mockCompData: ServerResponse<CompositeTrip> = {
phone_data: [
{
data: {
Expand Down
4 changes: 4 additions & 0 deletions www/__tests__/notifScheduler.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ const exampleReminderSchemes = {
mockLogger();
mockReminders();

jest.mock('i18next', () => ({
resolvedLanguage: 'en',
}));

jest.mock('../js/services/commHelper', () => ({
...jest.requireActual('../js/services/commHelper'),
getUser: jest.fn(() =>
Expand Down
5 changes: 3 additions & 2 deletions www/js/diary/timelineHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
FilteredLocation,
TimestampRange,
CompositeTrip,
UnprocessedTrip,
} from '../types/diaryTypes';
import { getLabelInputDetails, getLabelInputs } from '../survey/multilabel/confirmHelper';
import { LabelOptions } from '../types/labelTypes';
Expand Down Expand Up @@ -461,9 +462,9 @@ const isEndingTransition = function (transWrapper: BEMData<TripTransition>) {
*
* Let's abstract this out into our own minor state machine.
*/
const transitions2Trips = function (transitionList: Array<ServerData<TripTransition>>) {
const transitions2Trips = function (transitionList: Array<BEMData<TripTransition>>) {
let inTrip = false;
const tripList: [ServerData<TripTransition>, ServerData<TripTransition>][] = [];
const tripList: [BEMData<TripTransition>, BEMData<TripTransition>][] = [];
let currStartTransitionIndex = -1;
let currEndTransitionIndex = -1;
let processedUntil = 0;
Expand Down

0 comments on commit d5fe4b4

Please sign in to comment.