Skip to content

Commit 906545f

Browse files
committed
emoji test: Avoid depending on any popular emoji being absent
These searches for 'h' and 's' would have many results in a real emoji database; in particular they'd have multiple results even in an emoji database that has just the six "popular" emoji. We'll soon make a change that causes those "popular" emoji to always be present. To prepare these tests, make the queries more specific.
1 parent d9a49d2 commit 906545f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/model/emoji_test.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ void main() {
292292
final store = prepare(
293293
realmEmoji: {'1': 'happy'}, unicodeEmoji: {'1f642': ['smile']});
294294
final view = EmojiAutocompleteView.init(store: store,
295-
query: EmojiAutocompleteQuery('h'));
295+
query: EmojiAutocompleteQuery('hap'));
296296
bool done = false;
297297
view.addListener(() { done = true; });
298298
await Future(() {});
@@ -301,7 +301,7 @@ void main() {
301301
isRealmResult(emojiName: 'happy'));
302302

303303
done = false;
304-
view.query = EmojiAutocompleteQuery('s');
304+
view.query = EmojiAutocompleteQuery('sm');
305305
await Future(() {});
306306
check(done).isTrue();
307307
check(view.results).single.which(

0 commit comments

Comments
 (0)