Removed some more methods.

This commit is contained in:
Jeremy Zimmerman 2022-11-11 12:55:18 -05:00
parent 3cc0a9230f
commit 096cbee850

View file

@ -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.