Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-06-24 12:07:22 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-06-24 12:07:22 +0300
commit23b60ed2c1e1dc5598fe5d44425f2aac11024d01 (patch)
tree5242d74c24979f6b94003c3a06584211ffcd1583 /spec/frontend/vue_shared
parentc81279ca90155fbb959987105797d02cd808e992 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/vue_shared')
-rw-r--r--spec/frontend/vue_shared/plugins/global_toast_spec.js9
1 files changed, 4 insertions, 5 deletions
diff --git a/spec/frontend/vue_shared/plugins/global_toast_spec.js b/spec/frontend/vue_shared/plugins/global_toast_spec.js
index 89f43a5e556..322586a772c 100644
--- a/spec/frontend/vue_shared/plugins/global_toast_spec.js
+++ b/spec/frontend/vue_shared/plugins/global_toast_spec.js
@@ -1,11 +1,10 @@
-import Vue from 'vue';
-import toast from '~/vue_shared/plugins/global_toast';
+import toast, { instance } from '~/vue_shared/plugins/global_toast';
describe('Global toast', () => {
let spyFunc;
beforeEach(() => {
- spyFunc = jest.spyOn(Vue.prototype.$toast, 'show').mockImplementation(() => {});
+ spyFunc = jest.spyOn(instance.$toast, 'show').mockImplementation(() => {});
});
afterEach(() => {
@@ -18,7 +17,7 @@ describe('Global toast', () => {
toast(arg1, arg2);
- expect(Vue.prototype.$toast.show).toHaveBeenCalledTimes(1);
- expect(Vue.prototype.$toast.show).toHaveBeenCalledWith(arg1, arg2);
+ expect(instance.$toast.show).toHaveBeenCalledTimes(1);
+ expect(instance.$toast.show).toHaveBeenCalledWith(arg1, arg2);
});
});