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