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/vue_shared/components/rich_content_editor/services/renderers/render_kramdown_list_spec.js')
-rw-r--r--spec/frontend/vue_shared/components/rich_content_editor/services/renderers/render_kramdown_list_spec.js23
1 files changed, 3 insertions, 20 deletions
diff --git a/spec/frontend/vue_shared/components/rich_content_editor/services/renderers/render_kramdown_list_spec.js b/spec/frontend/vue_shared/components/rich_content_editor/services/renderers/render_kramdown_list_spec.js
index e60bf1c8c92..7d427108ba6 100644
--- a/spec/frontend/vue_shared/components/rich_content_editor/services/renderers/render_kramdown_list_spec.js
+++ b/spec/frontend/vue_shared/components/rich_content_editor/services/renderers/render_kramdown_list_spec.js
@@ -1,8 +1,5 @@
import renderer from '~/vue_shared/components/rich_content_editor/services/renderers/render_kramdown_list';
-import {
- buildUneditableOpenTokens,
- buildUneditableCloseToken,
-} from '~/vue_shared/components/rich_content_editor/services/renderers/build_uneditable_token';
+import { renderUneditableBranch } from '~/vue_shared/components/rich_content_editor/services/renderers/render_utils';
import { buildMockTextNode } from './mock_data';
@@ -34,22 +31,8 @@ describe('Render Kramdown List renderer', () => {
});
describe('render', () => {
- const origin = jest.fn();
-
- it('should return uneditable open tokens when entering', () => {
- const context = { entering: true, origin };
-
- expect(renderer.render(kramdownListNode, context)).toStrictEqual(
- buildUneditableOpenTokens(origin()),
- );
- });
-
- it('should return an uneditable close tokens when exiting', () => {
- const context = { entering: false, origin };
-
- expect(renderer.render(kramdownListNode, context)).toStrictEqual(
- buildUneditableCloseToken(origin()),
- );
+ it('should delegate rendering to the renderUneditableBranch util', () => {
+ expect(renderer.render).toBe(renderUneditableBranch);
});
});
});