Removed some more methods.
This commit is contained in:
parent
3cc0a9230f
commit
096cbee850
1 changed files with 2 additions and 19 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Reference in a new issue