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

Fixed tests leaking editor instance / DOM element. #535

Merged
merged 1 commit into from
Jan 7, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions tests/dropdown/dropdownview.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ describe( 'DropdownView', () => {

describe( 'render()', () => {
it( 'starts listening for #keystrokes coming from #element', () => {
view = new DropdownView( locale,
const view = new DropdownView( locale,
new ButtonView( locale ),
new DropdownPanelView( locale ) );

Expand All @@ -195,10 +195,12 @@ describe( 'DropdownView', () => {
view.render();
sinon.assert.calledOnce( spy );
sinon.assert.calledWithExactly( spy, view.element );

view.element.remove();
} );

it( 'adds #element to #focusTracker', () => {
view = new DropdownView( locale,
const view = new DropdownView( locale,
new ButtonView( locale ),
new DropdownPanelView( locale ) );

Expand All @@ -207,6 +209,8 @@ describe( 'DropdownView', () => {
view.render();
sinon.assert.calledOnce( spy );
sinon.assert.calledWithExactly( spy, view.element );

view.element.remove();
} );

describe( 'activates keyboard navigation for the dropdown', () => {
Expand Down