diff options
Diffstat (limited to 'spec/frontend/__mocks__/@toast-ui/vue-editor')
-rw-r--r-- | spec/frontend/__mocks__/@toast-ui/vue-editor/index.js | 17 |
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) { |