diff options
Diffstat (limited to 'spec/frontend/pipelines/graph/action_component_spec.js')
-rw-r--r-- | spec/frontend/pipelines/graph/action_component_spec.js | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/spec/frontend/pipelines/graph/action_component_spec.js b/spec/frontend/pipelines/graph/action_component_spec.js index fab6e6887b7..6e5aa572ec0 100644 --- a/spec/frontend/pipelines/graph/action_component_spec.js +++ b/spec/frontend/pipelines/graph/action_component_spec.js @@ -48,17 +48,14 @@ describe('pipeline graph action component', () => { }); describe('on click', () => { - it('emits `pipelineActionRequestComplete` after a successful request', (done) => { + it('emits `pipelineActionRequestComplete` after a successful request', async () => { jest.spyOn(wrapper.vm, '$emit'); findButton().trigger('click'); - waitForPromises() - .then(() => { - expect(wrapper.vm.$emit).toHaveBeenCalledWith('pipelineActionRequestComplete'); - done(); - }) - .catch(done.fail); + await waitForPromises(); + + expect(wrapper.vm.$emit).toHaveBeenCalledWith('pipelineActionRequestComplete'); }); it('renders a loading icon while waiting for request', async () => { |