import {getDamageString, isGlassAvailableForCarId} from "./damage-helper"; //import baseMixin from "@/mixins/base-mixin.js"; jest.mock("@/store", () => ({ getters: {damage: { glassToReplace: [{location: "Windshield", name: "windshield"}] } } })); describe("damage-helper.js", () => { it("Should return damage getter info", () => { const damage = getDamageString(); expect(damage).toEqual("Windshield") }); }); // describe("damage-helper.js", () => { // it("Should return false if no mismatches between each array", async () => { // const updatedOptions = { // data: { // windshieldOptions: {availableReplacementOptions: ["windshield"]} // } // } // baseMixin.methods.dispatchNonBlockingStoreAction = jest.fn().mockImplementation(()=> { // return updatedOptions; // }); // const misMatch = await isGlassAvailableForCarId(); // expect(misMatch).toEqual(false); // }); // }); // describe("damage-helper.js", () => { // it("Should return true if there are any mismatches between arrays", () => { // const newOptions = { // windshieldOptions: {availableReplacementOptions: ["window"]} // } // const currentOptions = [{location: "Windshield", name: "windshield"}]; // const misMatch = compareGlassOptions(newOptions, currentOptions); // expect(misMatch).toEqual(true); // }); // });