Created
August 17, 2020 14:25
-
-
Save javierfernandes/09016ef3d04d7606365c8f3a8f727a20 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| describe('isWholeBlockSelected()', () => { | |
| [ | |
| ['[>This is some text>]', true], | |
| ['T[>his is some text>]', false], | |
| ['[>This is some tex>]t', false], | |
| ['This is some text', false], | |
| ].forEach(([input, expected]) => { | |
| it(`"${input}" = ${expected}`, () => { | |
| const state = createState(input) | |
| expect(isWholeBlockSelected(state.getCurrentContent(), state.getSelection())) | |
| .toBe(expected) | |
| }) | |
| }) | |
| }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment