Skip to content

Commit b8abc6b

Browse files
committed
emoji test [nfc]: Make a nested prepare more like another (1/2)
We'd like to deduplicate and share this setup code.
1 parent 42f3d21 commit b8abc6b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/model/emoji_test.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,7 @@ void main() {
320320

321321
PerAccountStore prepare({
322322
Map<String, String> realmEmoji = const {},
323+
bool addServerDataForPopular = true,
323324
Map<String, List<String>>? unicodeEmoji,
324325
}) {
325326
final store = eg.store(
@@ -328,7 +329,9 @@ void main() {
328329
key: eg.realmEmojiItem(emojiCode: key, emojiName: value),
329330
}));
330331
final extraEmojiData = ServerEmojiData(codeToNames: unicodeEmoji ?? {});
331-
ServerEmojiData emojiData = eg.serverEmojiDataPopularPlus(extraEmojiData);
332+
final emojiData = addServerDataForPopular
333+
? eg.serverEmojiDataPopularPlus(extraEmojiData)
334+
: extraEmojiData;
332335
store.setServerEmojiData(emojiData);
333336
return store;
334337
}

0 commit comments

Comments
 (0)