Commit bf9b94c1 authored by Winnie Hellmann's avatar Winnie Hellmann Committed by Mike Greiling

Enable promise/param-name ESLint rule

parent 0afddb90
......@@ -46,7 +46,6 @@ rules:
promise/always-return: off
promise/no-callback-in-promise: off
promise/no-nesting: off
promise/param-names: off
promise/valid-params: off
overrides:
files:
......
......@@ -53,8 +53,8 @@ describe('AlertWidget', () => {
let resolveReadAlert;
spyOn(AlertsService.prototype, 'readAlert').and.returnValue(
new Promise(cb => {
resolveReadAlert = cb;
new Promise(resolve => {
resolveReadAlert = resolve;
}),
);
vm = mountComponent(AlertWidgetComponent, propsWithAlert, '#alert-widget');
......
......@@ -95,18 +95,18 @@ describe('IDE error message component', () => {
});
it('shows loading icon when loading', () => {
let resolve;
let resolveAction;
actionMock.mockImplementation(
() =>
new Promise(ok => {
resolve = ok;
new Promise(resolve => {
resolveAction = resolve;
}),
);
wrapper.find('button').trigger('click');
return wrapper.vm.$nextTick(() => {
expect(wrapper.find(GlLoadingIcon).isVisible()).toBe(true);
resolve();
resolveAction();
});
});
......
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