@ryusei/code
Version:
<div align="center"> <a href="https://code.ryuseijs.com"> <img alt="RyuseiCode" src="https://code.ryuseijs.com/images/svg/logo.svg" width="70"> </a>
27 lines (19 loc) • 596 B
text/typescript
import { init } from '../../../test';
describe( 'Editor', () => {
const Editor = init();
describe( '#focus()', () => {
test( 'can make the editor focused.', () => {
expect( Editor.isFocused() ).toBe( false );
Editor.focus();
expect( Editor.isFocused() ).toBe( true );
} );
} );
describe( '#blur()', () => {
test( 'can remove the focus from the editor.', () => {
Editor.focus();
expect( Editor.isFocused() ).toBe( true );
Editor.blur();
expect( Editor.isFocused() ).toBe( false );
} );
} );
} );