diff --git a/src/store/store.spec.js b/src/store/store.spec.js index 9c2dbb0a7..c09b20a93 100644 --- a/src/store/store.spec.js +++ b/src/store/store.spec.js @@ -406,14 +406,16 @@ describe("Actions", () => { it("lookupVinByImage action, should return list of vins", async () => { // Arrange const context = state; - const dummyImage = {}; + const image = new File([], "test.jpg", { + type: "image/jpeg", + }); globalMethods.callHttpClient.mockImplementation(() => { return Promise.resolve({ data: ["1C6JJTAG3NL134044"] }); }); // Act - const response = await actions.lookupVinByImage(context, dummyImage); + const response = await actions.lookupVinByImage(context, image); // Assert expect(response.data).toEqual(["1C6JJTAG3NL134044"]); @@ -422,7 +424,9 @@ describe("Actions", () => { it("lookupVinByImage action, should reject if error in calling API", async () => { // Arrange const context = state; - const dummyImage = {}; + const image = new File([], "test.jpg", { + type: "image/jpeg", + }); globalMethods.callHttpClient.mockImplementation(() => { return Promise.reject("An error occurred"); @@ -431,9 +435,7 @@ describe("Actions", () => { // Act // Assert - await expect(actions.lookupVinByImage(context, dummyImage)).rejects.toEqual( - "An error occurred" - ); + await expect(actions.lookupVinByImage(context, image)).rejects.toEqual("An error occurred"); }); it("getVehicleMakes action, should return makes list", async () => {