diff options
Diffstat (limited to 'spec/frontend/content_editor/extensions/diagram_spec.js')
-rw-r--r-- | spec/frontend/content_editor/extensions/diagram_spec.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/frontend/content_editor/extensions/diagram_spec.js b/spec/frontend/content_editor/extensions/diagram_spec.js new file mode 100644 index 00000000000..b8d9e0b5aeb --- /dev/null +++ b/spec/frontend/content_editor/extensions/diagram_spec.js @@ -0,0 +1,16 @@ +import Diagram from '~/content_editor/extensions/diagram'; +import CodeBlockHighlight from '~/content_editor/extensions/code_block_highlight'; + +describe('content_editor/extensions/diagram', () => { + it('inherits from code block highlight extension', () => { + expect(Diagram.parent).toBe(CodeBlockHighlight); + }); + + it('sets isDiagram attribute to true by default', () => { + expect(Diagram.config.addAttributes()).toEqual( + expect.objectContaining({ + isDiagram: { default: true }, + }), + ); + }); +}); |