Commit ffd9097e authored by Tom Quirk's avatar Tom Quirk

Mock utils.createDesignDetailFlash fn directly

Previously was trying to avoid an eslint error, but the
error was since resolved and hence the code could be
simplified.
parent c05dec6b
......@@ -198,14 +198,12 @@ describe('Design management design index page', () => {
});
});
it('creates flash on mutation error', () => {
const createDesignDetailFlash = jest.fn();
// eslint-disable-next-line import/no-named-as-default-member
utils.createDesignDetailFlash = createDesignDetailFlash;
utils.createDesignDetailFlash = jest.fn();
try {
wrapper.vm.onMutationError('test error');
} catch (e) {
expect(createDesignDetailFlash).toHaveBeenCalled();
expect(utils.createDesignDetailFlash).toHaveBeenCalled();
}
});
});
......
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