Typing while the emoji picker is up should enter search mode
This commit is contained in:
parent
e9f4e28b3d
commit
a52bb25731
4 changed files with 65 additions and 30 deletions
|
@ -1,9 +1,9 @@
|
|||
// Copyright 2021 Signal Messenger, LLC
|
||||
// Copyright 2021-2022 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import { assert } from 'chai';
|
||||
|
||||
import { getGraphemes, count } from '../../util/grapheme';
|
||||
import { getGraphemes, count, isSingleGrapheme } from '../../util/grapheme';
|
||||
|
||||
describe('grapheme utilities', () => {
|
||||
describe('getGraphemes', () => {
|
||||
|
@ -63,4 +63,20 @@ describe('grapheme utilities', () => {
|
|||
assert.strictEqual(count('L̷̳͔̲͝Ģ̵̮̯̤̩̙͍̬̟͉̹̘̹͍͈̮̦̰̣͟͝O̶̴̮̻̮̗͘͡!̴̷̟͓͓'), 4);
|
||||
});
|
||||
});
|
||||
|
||||
describe('isSingleGrapheme', () => {
|
||||
it('returns false for the empty string', () => {
|
||||
assert.isFalse(isSingleGrapheme(''));
|
||||
});
|
||||
it('returns true for single graphemes', () => {
|
||||
assert.isTrue(isSingleGrapheme('a'));
|
||||
assert.isTrue(isSingleGrapheme('å'));
|
||||
assert.isTrue(isSingleGrapheme('😍'));
|
||||
});
|
||||
it('returns false for multiple graphemes', () => {
|
||||
assert.isFalse(isSingleGrapheme('ab'));
|
||||
assert.isFalse(isSingleGrapheme('a😍'));
|
||||
assert.isFalse(isSingleGrapheme('😍a'));
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue