Skip to content

Commit

Permalink
Merge pull request #57793 from Shahidullah-Muffakir/fix/57789-typeche…
Browse files Browse the repository at this point in the history
…ck-sidebar-utils-report-type

Fix TypeScript type checking in SidebarUtils getOptionData test
  • Loading branch information
Beamanator authored Mar 5, 2025
2 parents 04d54f7 + b843368 commit ad7462d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/unit/SidebarUtilsTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,11 @@ describe('SidebarUtils', () => {
});

it('returns isPinned true only when report.isPinned is true', () => {
const MOCK_REPORT_PINNED: Report = {
const MOCK_REPORT_PINNED: OnyxEntry<Report> = {
reportID: '1',
isPinned: true,
};
const MOCK_REPORT_UNPINNED: Report = {
const MOCK_REPORT_UNPINNED: OnyxEntry<Report> = {
reportID: '2',
isPinned: false,
};
Expand All @@ -215,8 +215,8 @@ describe('SidebarUtils', () => {
policy: undefined,
parentReportAction: undefined,
hasViolations: false,
oneTransactionThreadReport: undefined,
});

const optionDataUnpinned = SidebarUtils.getOptionData({
report: MOCK_REPORT_UNPINNED,
reportNameValuePairs: {},
Expand All @@ -226,6 +226,7 @@ describe('SidebarUtils', () => {
policy: undefined,
parentReportAction: undefined,
hasViolations: false,
oneTransactionThreadReport: undefined,
});

expect(optionDataPinned?.isPinned).toBe(true);
Expand Down

0 comments on commit ad7462d

Please sign in to comment.