|
@@ -24,6 +24,7 @@ import log from '@ckeditor/ckeditor5-utils/src/log';
|
|
|
|
|
|
|
|
import ArticlePluginSet from '@ckeditor/ckeditor5-core/tests/_utils/articlepluginset';
|
|
import ArticlePluginSet from '@ckeditor/ckeditor5-core/tests/_utils/articlepluginset';
|
|
|
import { describeMemoryUsage, testMemoryUsage } from '@ckeditor/ckeditor5-core/tests/_utils/memory';
|
|
import { describeMemoryUsage, testMemoryUsage } from '@ckeditor/ckeditor5-core/tests/_utils/memory';
|
|
|
|
|
+import { assertCKEditorError } from '@ckeditor/ckeditor5-utils/tests/_utils/utils';
|
|
|
|
|
|
|
|
describe( 'BalloonEditor', () => {
|
|
describe( 'BalloonEditor', () => {
|
|
|
let editor, editorElement;
|
|
let editor, editorElement;
|
|
@@ -170,9 +171,11 @@ describe( 'BalloonEditor', () => {
|
|
|
expect.fail( 'Balloon editor should throw an error when both initial data are passed' );
|
|
expect.fail( 'Balloon editor should throw an error when both initial data are passed' );
|
|
|
},
|
|
},
|
|
|
err => {
|
|
err => {
|
|
|
- expect( err ).to.be.an( 'error' ).with.property( 'message' ).and
|
|
|
|
|
|
|
+ assertCKEditorError( err,
|
|
|
// eslint-disable-next-line max-len
|
|
// eslint-disable-next-line max-len
|
|
|
- .match( /^editor-create-initial-data: The config\.initialData option cannot be used together with initial data passed in Editor\.create\(\)\./ );
|
|
|
|
|
|
|
+ /^editor-create-initial-data: The config\.initialData option cannot be used together with initial data passed in Editor\.create\(\)\./,
|
|
|
|
|
+ null
|
|
|
|
|
+ );
|
|
|
}
|
|
}
|
|
|
)
|
|
)
|
|
|
.then( done )
|
|
.then( done )
|
|
@@ -213,8 +216,10 @@ describe( 'BalloonEditor', () => {
|
|
|
expect.fail( 'Balloon editor should throw an error when is initialized in textarea.' );
|
|
expect.fail( 'Balloon editor should throw an error when is initialized in textarea.' );
|
|
|
},
|
|
},
|
|
|
err => {
|
|
err => {
|
|
|
- expect( err ).to.be.an( 'error' ).with.property( 'message' ).and
|
|
|
|
|
- .match( /^editor-wrong-element: This type of editor cannot be initialized inside <textarea> element\./ );
|
|
|
|
|
|
|
+ assertCKEditorError( err,
|
|
|
|
|
+ /^editor-wrong-element: This type of editor cannot be initialized inside <textarea> element\./,
|
|
|
|
|
+ null
|
|
|
|
|
+ );
|
|
|
}
|
|
}
|
|
|
)
|
|
)
|
|
|
.then( done )
|
|
.then( done )
|