Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Merge pull request #93 from ckeditor/i/6002
Browse files Browse the repository at this point in the history
Tests: Fixed tests leaking editor instances / DOM elements. See ckeditor/ckeditor5#6002.
  • Loading branch information
pomek committed Jan 7, 2020
2 parents 5bb8010 + 22f4141 commit c8ba8bf
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions tests/automediaembed.js
Expand Up @@ -383,20 +383,18 @@ describe( 'AutoMediaEmbed - integration', () => {
}
} )
.then( newEditor => {
editor = newEditor;

setData( editor.model, '<paragraph>[]</paragraph>' );
pasteHtml( editor, 'https://www.youtube.com/watch?v=H08tGjXNHO4' );
setData( newEditor.model, '<paragraph>[]</paragraph>' );
pasteHtml( newEditor, 'https://www.youtube.com/watch?v=H08tGjXNHO4' );

clock.tick( 100 );

expect( getData( editor.model ) ).to.equal(
expect( getData( newEditor.model ) ).to.equal(
'<paragraph>https://www.youtube.com/watch?v=H08tGjXNHO4[]</paragraph>'
);

editorElement.remove();

return editor.destroy();
return newEditor.destroy();
} );
} );
} );
Expand Down

0 comments on commit c8ba8bf

Please sign in to comment.