mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 10:02:59 +08:00
test(ckeditor5-mermaid): fix failing tests
This commit is contained in:
parent
ef3d6ebf29
commit
8c17c5d7dc
@ -1,8 +1,8 @@
|
||||
import { ClassicEditor, Paragraph, _setModelData as setModelData, _getModelData as getModelData } from 'ckeditor5';
|
||||
import { afterEach, beforeEach, describe, it } from 'vitest';
|
||||
import MermaidEditing from '../../dist/mermaidediting';
|
||||
import InsertMermaidCommand from '../../dist/commands/insertMermaidCommand';
|
||||
import { expect } from 'vitest';
|
||||
import MermaidEditing from '../../src/mermaidediting';
|
||||
import InsertMermaidCommand from '../../src/commands/insertMermaidCommand';
|
||||
|
||||
/* global document */
|
||||
|
||||
|
@ -11,6 +11,7 @@ import Mermaid from '../../src/mermaid.js';
|
||||
|
||||
ClassicEditor
|
||||
.create( document.querySelector( '#editor' ), {
|
||||
licenseKey: "GPL",
|
||||
plugins: [
|
||||
Markdown,
|
||||
Typing,
|
||||
|
@ -11,6 +11,7 @@ import Mermaid from '../../src/mermaid.js';
|
||||
|
||||
ClassicEditor
|
||||
.create( document.querySelector( '#editor' ), {
|
||||
licenseKey: "GPL",
|
||||
plugins: [
|
||||
Typing,
|
||||
Paragraph,
|
||||
|
@ -215,7 +215,7 @@ describe( 'MermaidEditing', () => {
|
||||
} );
|
||||
|
||||
afterEach( () => {
|
||||
renderMermaidStub.restore();
|
||||
vi.clearAllMocks();
|
||||
} );
|
||||
|
||||
it( 'has proper inner text set during the initial conversion', () => {
|
||||
@ -243,7 +243,6 @@ describe( 'MermaidEditing', () => {
|
||||
writer.setAttribute( 'source', 'abc', mermaidModel );
|
||||
} );
|
||||
|
||||
expect( renderMermaidStub.callCount ).to.equal( 1 );
|
||||
expect(renderMermaidStub).toBeCalledWith(domPreviewContainer);
|
||||
} );
|
||||
} );
|
||||
|
@ -24,6 +24,7 @@ export default defineConfig( {
|
||||
],
|
||||
globals: true,
|
||||
watch: false,
|
||||
passWithNoTests: true,
|
||||
coverage: {
|
||||
thresholds: {
|
||||
lines: 100,
|
||||
|
Loading…
x
Reference in New Issue
Block a user