Import IKAR messenger client and server

This commit is contained in:
sevenhill
2026-10-07 22:06:07 +03:00
commit 69ea5091eb
1951 changed files with 424546 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
import 'package:flutter_test/flutter_test.dart';
import 'package:ikar/core/utils/channel_comments.dart';
void main() {
group('commentsInfoBatches', () {
test('splits long histories into bounded requests', () {
final ids = [for (var i = 0; i < 120; i++) '$i'];
final batches = commentsInfoBatches(ids);
expect(batches.map((b) => b.length), [50, 50, 20]);
expect(batches.expand((b) => b).toList(), ids);
});
test('short lists stay in one request', () {
expect(commentsInfoBatches(['1', '2']), [
['1', '2'],
]);
expect(commentsInfoBatches(const []), isEmpty);
});
});
}