|
|
@@ -34,15 +34,17 @@ describe( 'VirtualTestEditor', () => {
|
|
|
it( 'mixes DataApiMixin', () => {
|
|
|
expect( testUtils.isMixed( VirtualTestEditor, DataApiMixin ) ).to.true;
|
|
|
} );
|
|
|
+ } );
|
|
|
|
|
|
- it( 'supports `config.initialData`', () => {
|
|
|
+ describe( 'static create()', () => {
|
|
|
+ it( 'initializes the data controller with the `config.initialData`', () => {
|
|
|
return VirtualTestEditor.create( { initialData: '<p>foo</p>', plugins: [ Paragraph ] } )
|
|
|
.then( editor => {
|
|
|
expect( editor.getData() ).to.equal( '<p>foo</p>' );
|
|
|
} );
|
|
|
} );
|
|
|
|
|
|
- it( 'initializes an empty editor if the `config.initialData` is not provided', () => {
|
|
|
+ it( 'initializes the data controller with an empty string if the `config.initialData` is not provided', () => {
|
|
|
return VirtualTestEditor.create()
|
|
|
.then( editor => {
|
|
|
expect( editor.getData() ).to.equal( '' );
|