|
|
@@ -154,9 +154,19 @@ describe( 'InlineEditor', () => {
|
|
|
InlineEditor.create( '<p>Hello world!</p>', {
|
|
|
initialData: '<p>I am evil!</p>',
|
|
|
plugins: [ Paragraph ]
|
|
|
- } ).catch( () => {
|
|
|
- done();
|
|
|
- } );
|
|
|
+ } )
|
|
|
+ .then(
|
|
|
+ () => {
|
|
|
+ expect.fail( 'Inline editor should throw an error when both initial data are passed' );
|
|
|
+ },
|
|
|
+ err => {
|
|
|
+ expect( err ).to.be.an( 'error' ).with.property( 'message' ).and
|
|
|
+ // 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\(\)\./ );
|
|
|
+ }
|
|
|
+ )
|
|
|
+ .then( done )
|
|
|
+ .catch( done );
|
|
|
} );
|
|
|
|
|
|
// #25
|