From 99ae8bcb106be84a24ae545e2eb9010fad415c20 Mon Sep 17 00:00:00 2001 From: Chloe Herd Date: Wed, 21 Jun 2023 10:31:17 -0400 Subject: [PATCH] Update unit tests. --- src/store/store.spec.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/store/store.spec.js b/src/store/store.spec.js index 847701e67..9d9cdfcf4 100644 --- a/src/store/store.spec.js +++ b/src/store/store.spec.js @@ -547,28 +547,32 @@ describe("Actions", () => { // Arrange const context = state; const commit = jest.fn(); + const dispatch = jest.fn(); context.commit = commit; + context.dispatch = dispatch; // Act await actions.resetDamageAndDependencies(context); expect(commit).toBeCalledWith(storeMutations.RESET_DAMAGE_STATE); - expect(commit).toBeCalledWith(storeMutations.RESET_GLASS_PARTS_STATE); + expect(dispatch).toBeCalledWith(storeActions.RESET_PARTS_STATE_AND_DEPENDENCIES); }); it("resetRegistrationAndDependencies action", async () => { // Arrange const context = state; const commit = jest.fn(); + const dispatch = jest.fn(); context.commit = commit; + context.dispatch = dispatch; // Act await actions.resetRegistrationAndDependencies(context); expect(commit).toBeCalledWith(storeMutations.RESET_REGISTRATION_STATE); - expect(commit).toBeCalledWith(storeMutations.RESET_GLASS_PARTS_STATE); + expect(dispatch).toBeCalledWith(storeActions.RESET_PARTS_STATE_AND_DEPENDENCIES); }); it("resetPartsAndDependencies action", async () => {