From 1bb7f81e238569fd0fe2b0c4385f1015407a2d59 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Wed, 28 Sep 2022 15:09:17 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- spec/frontend/diffs/store/actions_spec.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'spec/frontend/diffs') diff --git a/spec/frontend/diffs/store/actions_spec.js b/spec/frontend/diffs/store/actions_spec.js index 346e43e5a72..638e4713ddc 100644 --- a/spec/frontend/diffs/store/actions_spec.js +++ b/spec/frontend/diffs/store/actions_spec.js @@ -13,7 +13,7 @@ import * as diffActions from '~/diffs/store/actions'; import * as types from '~/diffs/store/mutation_types'; import * as utils from '~/diffs/store/utils'; import * as treeWorkerUtils from '~/diffs/utils/tree_worker_utils'; -import createFlash from '~/flash'; +import { createAlert } from '~/flash'; import axios from '~/lib/utils/axios_utils'; import * as commonUtils from '~/lib/utils/common_utils'; import { mergeUrlParams } from '~/lib/utils/url_utility'; @@ -54,7 +54,7 @@ describe('DiffsStoreActions', () => { ['requestAnimationFrame', 'requestIdleCallback'].forEach((method) => { global[method] = originalMethods[method]; }); - createFlash.mockClear(); + createAlert.mockClear(); mock.restore(); }); @@ -254,8 +254,8 @@ describe('DiffsStoreActions', () => { mock.onGet(endpointCoverage).reply(400); await testAction(diffActions.fetchCoverageFiles, {}, { endpointCoverage }, [], []); - expect(createFlash).toHaveBeenCalledTimes(1); - expect(createFlash).toHaveBeenCalledWith({ + expect(createAlert).toHaveBeenCalledTimes(1); + expect(createAlert).toHaveBeenCalledWith({ message: expect.stringMatching('Something went wrong'), }); }); -- cgit v1.2.1