mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-09-19 10:15:22 +08:00
Removed unnecessary code from the test.
This commit is contained in:
parent
88d3d65c30
commit
9f843e8a76
@ -1,6 +1,5 @@
|
|||||||
import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor';
|
import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor';
|
||||||
import { getData as getModelData, setData as setModelData } from '@ckeditor/ckeditor5-engine/src/dev-utils/model';
|
import { setData as setModelData } from '@ckeditor/ckeditor5-engine/src/dev-utils/model';
|
||||||
import { Paragraph } from '@ckeditor/ckeditor5-paragraph';
|
|
||||||
|
|
||||||
import Mermaid from '../src/mermaid';
|
import Mermaid from '../src/mermaid';
|
||||||
import MermaidUI from '../src/mermaidui';
|
import MermaidUI from '../src/mermaidui';
|
||||||
@ -21,8 +20,7 @@ describe( 'MermaidUI', () => {
|
|||||||
|
|
||||||
editor = await ClassicEditor.create( domElement, {
|
editor = await ClassicEditor.create( domElement, {
|
||||||
plugins: [
|
plugins: [
|
||||||
Mermaid,
|
Mermaid
|
||||||
Paragraph
|
|
||||||
]
|
]
|
||||||
} );
|
} );
|
||||||
} );
|
} );
|
||||||
@ -76,9 +74,7 @@ describe( 'MermaidUI', () => {
|
|||||||
it( 'should not crash if the button is fired inside model.change()', () => {
|
it( 'should not crash if the button is fired inside model.change()', () => {
|
||||||
const button = editor.ui.componentFactory.create( 'mermaid' );
|
const button = editor.ui.componentFactory.create( 'mermaid' );
|
||||||
|
|
||||||
setModelData( editor.model,
|
setModelData( editor.model, '[]' );
|
||||||
'<paragraph>[foo]</paragraph>'
|
|
||||||
);
|
|
||||||
|
|
||||||
editor.model.change( () => {
|
editor.model.change( () => {
|
||||||
button.fire( 'execute' );
|
button.fire( 'execute' );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user