Skip to content

Commit 8558ca3

Browse files
committed
Clean up code comments even more
1 parent 0bc862d commit 8558ca3

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

tests/perf-test/OptimisticReportNames.perf-test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@ import {createRandomReport} from '../utils/collections/reports';
1212
import waitForBatchedUpdates from '../utils/waitForBatchedUpdates';
1313

1414
// Mock dependencies
15-
// Partial mock preserves parseReportRouteParams and other exports that are used by Report.ts's dependencies
1615
jest.mock('@libs/ReportUtils', () => ({
16+
// jest.requireActual is necessary to include multi-layered module imports (eg. Report.ts has processReportIDDeeplink() which uses parseReportRouteParams() imported from getReportIDFromUrl.ts)
17+
// Without jest.requireActual, parseReportRouteParams would be undefined, causing the test to fail.
1718
...jest.requireActual<typeof ReportUtils>('@libs/ReportUtils'),
19+
// These methods are mocked below in the beforeAll function to return specific values
1820
isExpenseReport: jest.fn(),
1921
getTitleReportField: jest.fn(),
2022
}));

0 commit comments

Comments
 (0)