Skip to content

Commit f337b31

Browse files
committed
update test
1 parent 42ac193 commit f337b31

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

src/libs/ReportUtils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8728,7 +8728,7 @@ function buildTransactionThread(
87288728
existingTransactionThreadReportID?: string,
87298729
optimisticTransactionThreadReportID?: string,
87308730
): OptimisticChatReport {
8731-
const participantAccountIDs = [...new Set([currentUserAccountID, Number(reportAction?.actorAccountID)])].filter(Boolean) as number[];
8731+
const participantAccountIDs = [...new Set([currentUserAccountID, Number(reportAction?.actorAccountID)])].filter(Boolean);
87328732
const existingTransactionThreadReport = getReportOrDraftReport(existingTransactionThreadReportID);
87338733

87348734
if (existingTransactionThreadReportID && existingTransactionThreadReport) {

tests/actions/IOUTest/TrackExpenseTest.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1881,7 +1881,10 @@ describe('actions/IOU/TrackExpense', () => {
18811881
// Given initial environment is set up
18821882
await waitForBatchedUpdates();
18831883

1884-
expect(thread.participants).toEqual({[CARLOS_ACCOUNT_ID]: {notificationPreference: CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN, role: CONST.REPORT.ROLE.ADMIN}});
1884+
expect(thread.participants).toEqual({
1885+
[RORY_ACCOUNT_ID]: {notificationPreference: CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN, role: CONST.REPORT.ROLE.ADMIN},
1886+
[CARLOS_ACCOUNT_ID]: {notificationPreference: CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN, role: CONST.REPORT.ROLE.MEMBER},
1887+
});
18851888

18861889
const participantAccountIDs = Object.keys(thread.participants ?? {}).map(Number);
18871890
const userLogins = getLoginsByAccountIDs(participantAccountIDs);
@@ -1987,7 +1990,10 @@ describe('actions/IOU/TrackExpense', () => {
19871990
// Given initial environment is set up
19881991
await waitForBatchedUpdates();
19891992

1990-
expect(thread.participants).toEqual({[CARLOS_ACCOUNT_ID]: {notificationPreference: CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN, role: CONST.REPORT.ROLE.ADMIN}});
1993+
expect(thread.participants).toEqual({
1994+
[RORY_ACCOUNT_ID]: {notificationPreference: CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN, role: CONST.REPORT.ROLE.ADMIN},
1995+
[CARLOS_ACCOUNT_ID]: {notificationPreference: CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN, role: CONST.REPORT.ROLE.MEMBER},
1996+
});
19911997

19921998
const participantAccountIDs = Object.keys(thread.participants ?? {}).map(Number);
19931999
const userLogins = getLoginsByAccountIDs(participantAccountIDs);

0 commit comments

Comments
 (0)