Commit c033d038 authored by Mike Greiling's avatar Mike Greiling

Merge branch 'winh-eslint-promise/param-name' into 'master'

Enable promise/param-name ESLint rule

See merge request gitlab-org/gitlab!17632
parents 0afddb90 bf9b94c1
......@@ -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