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:
Diffstat (limited to 'spec/frontend/__mocks__/@toast-ui/vue-editor/index.js')
-rw-r--r--spec/frontend/__mocks__/@toast-ui/vue-editor/index.js17
1 files changed, 9 insertions, 8 deletions
diff --git a/spec/frontend/__mocks__/@toast-ui/vue-editor/index.js b/spec/frontend/__mocks__/@toast-ui/vue-editor/index.js
index 9fee8e18d26..2acd8111c77 100644
--- a/spec/frontend/__mocks__/@toast-ui/vue-editor/index.js
+++ b/spec/frontend/__mocks__/@toast-ui/vue-editor/index.js
@@ -1,3 +1,12 @@
+export const mockEditorApi = {
+ eventManager: {
+ addEventType: jest.fn(),
+ listen: jest.fn(),
+ removeEventHandler: jest.fn(),
+ },
+ getMarkdown: jest.fn(),
+};
+
export const Editor = {
props: {
initialValue: {
@@ -18,14 +27,6 @@ export const Editor = {
},
},
created() {
- const mockEditorApi = {
- eventManager: {
- addEventType: jest.fn(),
- listen: jest.fn(),
- removeEventHandler: jest.fn(),
- },
- };
-
this.$emit('load', mockEditorApi);
},
render(h) {