From 096cbee850da1c4f44240d09eb92319e356c147d Mon Sep 17 00:00:00 2001 From: Jeremy Zimmerman Date: Fri, 11 Nov 2022 12:55:18 -0500 Subject: [PATCH] Removed some more methods. --- src/helpers/unit-test-helper.js | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/src/helpers/unit-test-helper.js b/src/helpers/unit-test-helper.js index 769e3588..ed273eb5 100644 --- a/src/helpers/unit-test-helper.js +++ b/src/helpers/unit-test-helper.js @@ -85,30 +85,13 @@ export function removeAllTestCookies() { }); } -export function setupMocksForJsFiles(mockData = {}) { - setupBaseMixinDispatchStoreAction(mockData); - +export function setupMocksForJsFiles() { return { baseMixin }; } // Private methods -function setupBaseMixinDispatchStoreAction(mockData) { - if (mockData.actionList !== undefined) { - baseMixin.methods.dispatchStoreAction = jest.fn(); - baseMixin.methods.dispatchStoreAction.mockImplementation((actionName) => { - let actionFilterResult = mockData.actionList.filter((x) => x.actionName == actionName); - if (actionFilterResult.length > 0 && actionFilterResult.length === 1) { - return Promise.resolve({ - data: actionFilterResult[0].data, - }); - } - }); - } -} - - - /* +/* // Common methods export function getMountOptions(mockData) { // Define our mocks to attached to the 'global' object for Vue/Jest.