Skip to content

Commit

Permalink
Fix unit test withFocusReturn
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed Dec 10, 2020
1 parent 232eca1 commit a6b3244
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -2,7 +2,7 @@
* External dependencies
*/
import renderer from 'react-test-renderer';
import { render } from '@testing-library/react';
import { render, fireEvent } from '@testing-library/react';

/**
* WordPress dependencies
Expand Down Expand Up @@ -93,6 +93,7 @@ describe( 'withFocusReturn()', () => {
} );

const textarea = container.querySelector( 'textarea' );
fireEvent.focusIn( textarea, { target: textarea } );
textarea.focus();
expect( document.activeElement ).toBe( textarea );

Expand Down

0 comments on commit a6b3244

Please sign in to comment.