|
|
@@ -3,6 +3,8 @@
|
|
|
* For licensing, see LICENSE.md.
|
|
|
*/
|
|
|
|
|
|
+import ViewDocument from '@ckeditor/ckeditor5-engine/src/view/document';
|
|
|
+import ViewWriter from '@ckeditor/ckeditor5-engine/src/view/writer';
|
|
|
import AttributeElement from '@ckeditor/ckeditor5-engine/src/view/attributeelement';
|
|
|
import ContainerElement from '@ckeditor/ckeditor5-engine/src/view/containerelement';
|
|
|
import Text from '@ckeditor/ckeditor5-engine/src/view/text';
|
|
|
@@ -12,7 +14,7 @@ import { createLinkElement, isLinkElement } from '../src/utils';
|
|
|
describe( 'utils', () => {
|
|
|
describe( 'isLinkElement', () => {
|
|
|
it( 'should return true for elements created by createLinkElement', () => {
|
|
|
- const element = createLinkElement( 'http://ckeditor.com' );
|
|
|
+ const element = createLinkElement( 'http://ckeditor.com', new ViewWriter( new ViewDocument() ) );
|
|
|
|
|
|
expect( isLinkElement( element ) ).to.be.true;
|
|
|
} );
|
|
|
@@ -32,7 +34,7 @@ describe( 'utils', () => {
|
|
|
|
|
|
describe( 'createLinkElement', () => {
|
|
|
it( 'should create link AttributeElement', () => {
|
|
|
- const element = createLinkElement( 'http://cksource.com' );
|
|
|
+ const element = createLinkElement( 'http://cksource.com', new ViewWriter( new ViewDocument() ) );
|
|
|
|
|
|
expect( isLinkElement( element ) ).to.be.true;
|
|
|
expect( element.priority ).to.equal( 5 );
|