diff --git a/packages/ckeditor5-footnotes/tests/footnotes.ts b/packages/ckeditor5-footnotes/tests/footnotes.ts deleted file mode 100644 index 0e5320be0..000000000 --- a/packages/ckeditor5-footnotes/tests/footnotes.ts +++ /dev/null @@ -1,56 +0,0 @@ -import { describe, expect, it, beforeEach, afterEach } from 'vitest'; -import { ClassicEditor, Essentials, Paragraph, Heading } from 'ckeditor5'; -import Footnotes from '../src/footnotes.js'; - -describe( 'Footnotes', () => { - it( 'should be named', () => { - expect( Footnotes.pluginName ).to.equal( 'Footnotes' ); - } ); - - describe( 'init()', () => { - let domElement: HTMLElement, editor: ClassicEditor; - - beforeEach( async () => { - domElement = document.createElement( 'div' ); - document.body.appendChild( domElement ); - - editor = await ClassicEditor.create( domElement, { - licenseKey: 'GPL', - plugins: [ - Paragraph, - Heading, - Essentials, - Footnotes - ], - toolbar: [ - 'footnotes' - ] - } ); - } ); - - afterEach( () => { - domElement.remove(); - return editor.destroy(); - } ); - - it( 'should load Footnotes', () => { - const myPlugin = editor.plugins.get( 'Footnotes' ); - - expect( myPlugin ).to.be.an.instanceof( Footnotes ); - } ); - - it( 'should add an icon to the toolbar', () => { - expect( editor.ui.componentFactory.has( 'footnotes' ) ).to.equal( true ); - } ); - - it( 'should add a text into the editor after clicking the icon', () => { - const icon = editor.ui.componentFactory.create( 'footnotes' ); - - expect( editor.getData() ).to.equal( '' ); - - icon.fire( 'execute' ); - - expect( editor.getData() ).to.equal( '
Hello CKEditor 5!
' ); - } ); - } ); -} ); diff --git a/packages/ckeditor5-footnotes/tests/index.ts b/packages/ckeditor5-footnotes/tests/index.ts deleted file mode 100644 index c1c70628c..000000000 --- a/packages/ckeditor5-footnotes/tests/index.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { describe, expect, it } from 'vitest'; -import { Footnotes as FootnotesDll, icons } from '../src/index.js'; -import Footnotes from '../src/footnotes.js'; - -import ckeditor from './../theme/icons/ckeditor.svg'; - -describe( 'CKEditor5 Footnotes DLL', () => { - it( 'exports Footnotes', () => { - expect( FootnotesDll ).to.equal( Footnotes ); - } ); - - describe( 'icons', () => { - it( 'exports the "ckeditor" icon', () => { - expect( icons.ckeditor ).to.equal( ckeditor ); - } ); - } ); -} ); diff --git a/packages/ckeditor5-footnotes/vitest.config.ts b/packages/ckeditor5-footnotes/vitest.config.ts index 2758520eb..636654886 100644 --- a/packages/ckeditor5-footnotes/vitest.config.ts +++ b/packages/ckeditor5-footnotes/vitest.config.ts @@ -24,6 +24,7 @@ export default defineConfig( { ], globals: true, watch: false, + passWithNoTests: true, coverage: { thresholds: { lines: 100, diff --git a/packages/ckeditor5-keyboard-marker/tests/index.ts b/packages/ckeditor5-keyboard-marker/tests/index.ts deleted file mode 100644 index 3ceb25a7a..000000000 --- a/packages/ckeditor5-keyboard-marker/tests/index.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { describe, expect, it } from 'vitest'; -import { KeyboardMarker as KeyboardMarkerDll, icons } from '../src/index.js'; -import KeyboardMarker from '../src/keyboardmarker.js'; - -import ckeditor from './../theme/icons/ckeditor.svg'; - -describe( 'CKEditor5 KeyboardMarker DLL', () => { - it( 'exports KeyboardMarker', () => { - expect( KeyboardMarkerDll ).to.equal( KeyboardMarker ); - } ); - - describe( 'icons', () => { - it( 'exports the "ckeditor" icon', () => { - expect( icons.ckeditor ).to.equal( ckeditor ); - } ); - } ); -} ); diff --git a/packages/ckeditor5-keyboard-marker/tests/keyboardmarker.ts b/packages/ckeditor5-keyboard-marker/tests/keyboardmarker.ts deleted file mode 100644 index 0b7fef9d6..000000000 --- a/packages/ckeditor5-keyboard-marker/tests/keyboardmarker.ts +++ /dev/null @@ -1,56 +0,0 @@ -import { describe, expect, it, beforeEach, afterEach } from 'vitest'; -import { ClassicEditor, Essentials, Paragraph, Heading } from 'ckeditor5'; -import KeyboardMarker from '../src/keyboardmarker.js'; - -describe( 'KeyboardMarker', () => { - it( 'should be named', () => { - expect( KeyboardMarker.pluginName ).to.equal( 'KeyboardMarker' ); - } ); - - describe( 'init()', () => { - let domElement: HTMLElement, editor: ClassicEditor; - - beforeEach( async () => { - domElement = document.createElement( 'div' ); - document.body.appendChild( domElement ); - - editor = await ClassicEditor.create( domElement, { - licenseKey: 'GPL', - plugins: [ - Paragraph, - Heading, - Essentials, - KeyboardMarker - ], - toolbar: [ - 'keyboardMarker' - ] - } ); - } ); - - afterEach( () => { - domElement.remove(); - return editor.destroy(); - } ); - - it( 'should load KeyboardMarker', () => { - const myPlugin = editor.plugins.get( 'KeyboardMarker' ); - - expect( myPlugin ).to.be.an.instanceof( KeyboardMarker ); - } ); - - it( 'should add an icon to the toolbar', () => { - expect( editor.ui.componentFactory.has( 'keyboardMarker' ) ).to.equal( true ); - } ); - - it( 'should add a text into the editor after clicking the icon', () => { - const icon = editor.ui.componentFactory.create( 'keyboardMarker' ); - - expect( editor.getData() ).to.equal( '' ); - - icon.fire( 'execute' ); - - expect( editor.getData() ).to.equal( 'Hello CKEditor 5!
' ); - } ); - } ); -} ); diff --git a/packages/ckeditor5-keyboard-marker/vitest.config.ts b/packages/ckeditor5-keyboard-marker/vitest.config.ts index 2758520eb..636654886 100644 --- a/packages/ckeditor5-keyboard-marker/vitest.config.ts +++ b/packages/ckeditor5-keyboard-marker/vitest.config.ts @@ -24,6 +24,7 @@ export default defineConfig( { ], globals: true, watch: false, + passWithNoTests: true, coverage: { thresholds: { lines: 100,