Skip to content

Commit fa3c4fd

Browse files
committed
test: put cursor at the end of the text
1 parent 12d16e7 commit fa3c4fd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/unit/MessageComposer/textComposer.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,10 @@ describe('TextComposer', () => {
106106
const { textComposer } = setup({ message });
107107

108108
expect(textComposer.text).toBe('Hello world');
109-
expect(textComposer.selection).toEqual({ start: 0, end: 0 });
109+
expect(textComposer.selection).toEqual({
110+
start: message.text.length,
111+
end: message.text.length,
112+
});
110113
expect(textComposer.mentionedUsers).toEqual([
111114
{ id: 'user-1' },
112115
{ id: 'user-2', name: 'User 2' },

0 commit comments

Comments
 (0)