|
|
@@ -453,14 +453,19 @@ describe( 'Editor', () => {
|
|
|
const editor = new TestEditor();
|
|
|
|
|
|
editor.on( 'destroy', () => {
|
|
|
- done();
|
|
|
+ spy();
|
|
|
} );
|
|
|
|
|
|
- editor.destroy();
|
|
|
-
|
|
|
- sinon.assert.notCalled( spy );
|
|
|
+ editor
|
|
|
+ .destroy()
|
|
|
+ .then( () => {
|
|
|
+ done();
|
|
|
+ } );
|
|
|
|
|
|
- editor.fire( 'ready' );
|
|
|
+ setTimeout( () => {
|
|
|
+ sinon.assert.notCalled( spy );
|
|
|
+ editor.fire( 'ready' );
|
|
|
+ } );
|
|
|
} );
|
|
|
} );
|
|
|
|