Skip to content

Commit

Permalink
Make sure two instances of MediaEmbed dropdown are created and differ…
Browse files Browse the repository at this point in the history
…ent from each other.

As suggested at ckeditor/ckeditor5-media-embed#98 (review)
  • Loading branch information
tomalec committed May 4, 2020
1 parent 1189a50 commit 9dd2156
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/ckeditor5-media-embed/tests/mediaembedui.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,12 @@ describe( 'MediaEmbedUI', () => {
} );

it( 'should allow creating two instances', () => {
let secondInstance;

expect( function createSecondInstance() {
editor.ui.componentFactory.create( 'mediaEmbed' );
secondInstance = editor.ui.componentFactory.create( 'mediaEmbed' );
} ).not.to.throw();
expect( dropdown ).to.be.not.equal( secondInstance );
} );

describe( 'dropdown', () => {
Expand Down

0 comments on commit 9dd2156

Please sign in to comment.