diff --git a/tests/actions/IOUTest.js b/tests/actions/IOUTest.js index 3df3b137bab..63fd7a0dd78 100644 --- a/tests/actions/IOUTest.js +++ b/tests/actions/IOUTest.js @@ -1638,7 +1638,7 @@ describe('actions/IOU', () => { expect(resultAction.message).toEqual(REPORT_ACTION.message); expect(resultAction.person).toEqual(REPORT_ACTION.person); - expect(resultAction.pendingAction).toBeNull(); + expect(resultAction.pendingAction).toBeUndefined(); await waitForBatchedUpdates(); @@ -1647,7 +1647,7 @@ describe('actions/IOU', () => { // Then check the loading state of our action const resultActionAfterUpdate = reportActions[reportActionID]; - expect(resultActionAfterUpdate.pendingAction).toBeNull(); + expect(resultActionAfterUpdate.pendingAction).toBeUndefined(); // When we attempt to delete a money request from the IOU report fetch.pause(); @@ -1818,7 +1818,7 @@ describe('actions/IOU', () => { // Then the report should have 2 actions expect(_.size(reportActions)).toBe(2); const resultActionAfter = reportActions[reportActionID]; - expect(resultActionAfter.pendingAction).toBeNull(); + expect(resultActionAfter.pendingAction).toBeUndefined(); fetch.pause(); // When deleting money request @@ -1903,7 +1903,7 @@ describe('actions/IOU', () => { expect(resultAction.message).toEqual(REPORT_ACTION.message); expect(resultAction.person).toEqual(REPORT_ACTION.person); - expect(resultAction.pendingAction).toBeNull(); + expect(resultAction.pendingAction).toBeUndefined(); await waitForBatchedUpdates(); @@ -1913,7 +1913,7 @@ describe('actions/IOU', () => { let resultActionAfterUpdate = reportActions[reportActionID]; // Verify that our action is no longer in the loading state - expect(resultActionAfterUpdate.pendingAction).toBeNull(); + expect(resultActionAfterUpdate.pendingAction).toBeUndefined(); await waitForBatchedUpdates(); @@ -1935,7 +1935,7 @@ describe('actions/IOU', () => { expect(resultAction.message).toEqual(REPORT_ACTION.message); expect(resultAction.person).toEqual(REPORT_ACTION.person); - expect(resultAction.pendingAction).toBeNull(); + expect(resultAction.pendingAction).toBeUndefined(); await waitForBatchedUpdates(); @@ -1945,7 +1945,7 @@ describe('actions/IOU', () => { resultActionAfterUpdate = reportActions[reportActionID]; // Verify that our action is no longer in the loading state - expect(resultActionAfterUpdate.pendingAction).toBeNull(); + expect(resultActionAfterUpdate.pendingAction).toBeUndefined(); fetch.pause(); // When we delete the money request diff --git a/tests/actions/ReportTest.js b/tests/actions/ReportTest.js index 06d8304111c..aab454228d0 100644 --- a/tests/actions/ReportTest.js +++ b/tests/actions/ReportTest.js @@ -92,7 +92,7 @@ describe('actions/Report', () => { expect(resultAction.message).toEqual(REPORT_ACTION.message); expect(resultAction.person).toEqual(REPORT_ACTION.person); - expect(resultAction.pendingAction).toBeNull(); + expect(resultAction.pendingAction).toBeUndefined(); // We subscribed to the Pusher channel above and now we need to simulate a reportComment action // Pusher event so we can verify that action was handled correctly and merged into the reportActions. @@ -129,7 +129,7 @@ describe('actions/Report', () => { const resultAction = reportActions[reportActionID]; // Verify that our action is no longer in the loading state - expect(resultAction.pendingAction).toBeNull(); + expect(resultAction.pendingAction).toBeUndefined(); }); }); @@ -607,7 +607,7 @@ describe('actions/Report', () => { // Expect the reaction to have null where the users reaction used to be expect(reportActionsReactions).toHaveProperty(`${ONYXKEYS.COLLECTION.REPORT_ACTIONS_REACTIONS}${reportActionID}`); const reportActionReaction = reportActionsReactions[`${ONYXKEYS.COLLECTION.REPORT_ACTIONS_REACTIONS}${reportActionID}`]; - expect(reportActionReaction[EMOJI.name].users[TEST_USER_ACCOUNT_ID]).toBeNull(); + expect(reportActionReaction[EMOJI.name].users[TEST_USER_ACCOUNT_ID]).toBeUndefined(); }) .then(() => { reportAction = _.first(_.values(reportActions)); @@ -649,7 +649,7 @@ describe('actions/Report', () => { // Expect the reaction to have null where the users reaction used to be expect(reportActionsReactions).toHaveProperty(`${ONYXKEYS.COLLECTION.REPORT_ACTIONS_REACTIONS}${reportActionID}`); const reportActionReaction = reportActionsReactions[`${ONYXKEYS.COLLECTION.REPORT_ACTIONS_REACTIONS}${reportActionID}`]; - expect(reportActionReaction[EMOJI.name].users[TEST_USER_ACCOUNT_ID]).toBeNull(); + expect(reportActionReaction[EMOJI.name].users[TEST_USER_ACCOUNT_ID]).toBeUndefined(); }); }); }); @@ -716,7 +716,7 @@ describe('actions/Report', () => { // Expect the reaction to have null where the users reaction used to be expect(reportActionsReactions).toHaveProperty(`${ONYXKEYS.COLLECTION.REPORT_ACTIONS_REACTIONS}${resultAction.reportActionID}`); const reportActionReaction = reportActionsReactions[`${ONYXKEYS.COLLECTION.REPORT_ACTIONS_REACTIONS}${resultAction.reportActionID}`]; - expect(reportActionReaction[EMOJI.name].users[TEST_USER_ACCOUNT_ID]).toBeNull(); + expect(reportActionReaction[EMOJI.name].users[TEST_USER_ACCOUNT_ID]).toBeUndefined(); }); }); });