Named argument in setupSuccess

parent f0d7f7e8
......@@ -73,7 +73,7 @@ describe('OnDemandScansForm', () => {
findSiteProfilesSelector().vm.$emit('input', nonValidatedSiteProfile.id);
return subject.vm.$nextTick();
};
const setupSuccess = (edit = false) => {
const setupSuccess = ({ edit = false } = {}) => {
jest.spyOn(subject.vm.$apollo, 'mutate').mockResolvedValue({
data: {
[edit ? 'dastScanUpdate' : 'dastScanCreate']: {
......@@ -294,7 +294,7 @@ describe('OnDemandScansForm', () => {
dastScan,
},
});
await setupSuccess(true);
await setupSuccess({ edit: true });
actionFunction();
});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment