Skip to content

Commit c144307

Browse files
committed
Fixed WASM runtime v4
1 parent 0eabc8d commit c144307

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

pkgs/http/test/html/cache_test.dart

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,11 @@ import 'package:test/test.dart';
1515

1616
import 'utils.dart';
1717

18-
extension on StreamChannel<dynamic> {
19-
/// Handles the Wasm case where the runtime type is actually [double] instead
20-
/// of the JS case where its [int].
21-
Future<int> get firstAsInt async => ((await stream.first) as num).toInt();
22-
}
23-
2418
void main() {
2519
late Uri url;
2620
setUp(() async {
2721
final channel = spawnHybridUri(Uri(path: '/test/stub_server.dart'));
28-
var port = await channel.firstAsInt;
22+
var port = await (channel.stream.first as num).toInt();
2923
url = echoUrl.replace(port: port);
3024
});
3125

0 commit comments

Comments
 (0)