diff --git a/tests/unit/deepReplaceKeysAndValuesTest.ts b/tests/unit/deepReplaceKeysAndValuesTest.ts index 246ca6833f19..46c0d4b7b9e2 100644 --- a/tests/unit/deepReplaceKeysAndValuesTest.ts +++ b/tests/unit/deepReplaceKeysAndValuesTest.ts @@ -1,3 +1,4 @@ +/* eslint-disable @typescript-eslint/naming-convention */ import deepReplaceKeysAndValues from '@libs/deepReplaceKeysAndValues'; import type {ReplaceableValue} from '@libs/deepReplaceKeysAndValues'; diff --git a/tests/utils/ReportTestUtils.ts b/tests/utils/ReportTestUtils.ts index 59175f76108f..4a4ce89d0296 100644 --- a/tests/utils/ReportTestUtils.ts +++ b/tests/utils/ReportTestUtils.ts @@ -1,5 +1,5 @@ -import {ReportAction, ReportActions} from '@src/types/onyx'; -import {ActionName} from '@src/types/onyx/OriginalMessage'; +import type {ReportAction, ReportActions} from '@src/types/onyx'; +import type {ActionName} from '@src/types/onyx/OriginalMessage'; import createRandomReportAction from './collections/reportActions'; const actionNames: ActionName[] = ['ADDCOMMENT', 'IOU', 'REPORTPREVIEW', 'CLOSED']; @@ -48,12 +48,12 @@ const getFakeReportAction = (index: number, actionName?: ActionName): ReportActi whisperedToAccountIDs: [], } as ReportAction); -const getMockedSortedReportActions = (length = 100): ReportAction[] => Array.from({length}, (__, i): ReportAction => getFakeReportAction(i)); +const getMockedSortedReportActions = (length = 100): ReportAction[] => Array.from({length}, (element, index): ReportAction => getFakeReportAction(index)); const getMockedReportActionsMap = (length = 100): ReportActions => { - const mockReports: ReportActions[] = Array.from({length}, (__, i): ReportActions => { - const reportID = i + 1; - const actionName: ActionName = i === 0 ? 'CREATED' : actionNames[i % actionNames.length]; + const mockReports: ReportActions[] = Array.from({length}, (element, index): ReportActions => { + const reportID = index + 1; + const actionName: ActionName = index === 0 ? 'CREATED' : actionNames[index % actionNames.length]; const reportAction = { ...createRandomReportAction(reportID), actionName, @@ -64,7 +64,7 @@ const getMockedReportActionsMap = (length = 100): ReportActions => { return {[reportID]: reportAction}; }); - return Object.assign({}, ...mockReports); + return Object.assign({}, ...mockReports) as ReportActions; }; export {getFakeReportAction, getMockedSortedReportActions, getMockedReportActionsMap};