From 11fd5a5e67b79e83f122a8bf10b03a5a9654f67b Mon Sep 17 00:00:00 2001 From: Chloe Herd Date: Tue, 20 Jun 2023 15:25:07 -0400 Subject: [PATCH] Patch directly failing tests --- src/store/store.spec.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/store/store.spec.js b/src/store/store.spec.js index 262cb263a..334118c23 100644 --- a/src/store/store.spec.js +++ b/src/store/store.spec.js @@ -575,13 +575,16 @@ describe("Actions", () => { // Arrange const context = state; const commit = jest.fn(); + const dispatch = jest.fn(); context.commit = commit; + context.dispatch = dispatch; // Act await actions.resetPartsAndDependencies(context); expect(commit).toBeCalledWith(storeMutations.RESET_GLASS_PARTS_STATE); + expect(dispatch).toBeCalledWith(storeActions.RESET_SERVICE_LOCATION_STATE_AND_DEPENDENCIES); }); it("resetState action", async () => { @@ -966,14 +969,17 @@ describe("Actions", () => { }; const commit = jest.fn(); + const dispatch = jest.fn(); context.commit = commit; + context.dispatch = dispatch; // Act actions.saveGlassParts(context, { glassParts: {} }); // Assert expect(commit).toBeCalledWith(storeMutations.UPDATE_GLASS_PARTS, { glassParts: {} }); + expect(dispatch).toBeCalledWith(storeActions.RESET_SERVICE_LOCATION_STATE_AND_DEPENDENCIES); }); it("clearVin, should call mutation", () => {