Skip to content

Commit

Permalink
attempt fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
SpeedReach committed Oct 6, 2023
1 parent 50f0f6a commit d59f8ad
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions dio/test/upload_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,13 @@ void main() {
);

test('send progress', () async {
final data = <Uint8List>[
Uint8List.fromList([10, 1]),
Uint8List.fromList([1, 4, 5]),
Uint8List.fromList([5, 1]),
Uint8List.fromList([1, 1]),
Uint8List.fromList([2, 4]),
final data = [
'aaaa',
'hello 😌',
'dio is a dart http client'
];
final stream = Stream.fromIterable(data);
final expanded = data.expand((element) => element);
final stream = Stream.fromIterable(data.map((e) => e.codeUnits));
final expanded = data.expand((element) =>element.codeUnits);
final List<int> collected = [];
final _ = await dio.put(
'/put',
Expand All @@ -124,7 +122,7 @@ void main() {
),
);
for (int i = 0; i < data.length; i++) {
expect(collected[i], data.sublist(0, i + 1).expand((e) => e).length);
expect(collected[i], data.sublist(0, i + 1).expand((e) => e.codeUnits).length);
}
});
}
Expand Down

0 comments on commit d59f8ad

Please sign in to comment.