CASH-132 mock experiment settings
This commit is contained in:
CarlNation 2025-02-24 10:32:27 -05:00
parent 80afae0e73
commit 4805c750ec

View file

@ -14,6 +14,19 @@ import { experimentSettings } from "@/constants/experiments";
const mockExperimentSettings = experimentSettings;
jest.mock("@/mixins/experiment-mixin.js", () => ({
methods: {
getSettingValue(settingName) {
if (settingName === mockExperimentSettings.RECAL_PRICE_REMOVE) {
return true;
}
},
hasSettingEqualTo(settingName, settingValue) {
return true;
},
},
}));
// Mock our module for promises.
jest.mock("@/helpers/layout-helper.js", () => ({
settleAllPromises: jest.fn(),
@ -572,13 +585,6 @@ function setupMocks({ customMountOptions }) {
getCmsContent: jest.fn().mockImplementation(() => {
return wordingText;
}),
getSettingValue: jest.fn((settingName) => {
if (settingName === experimentSettings.RECAL_PRICE_REMOVE) {
return "true";
}
return "false";
}),
},
},
];