File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,10 @@ class TestAssetServer {
2727 await buildRunner.close ();
2828 }
2929
30- static Future <TestAssetServer > start ({bool debug = false }) async {
30+ static Future <TestAssetServer > start ({
31+ bool debug = false ,
32+ int ? fixedPort,
33+ }) async {
3134 final packageConfig =
3235 await loadPackageConfigUri ((await Isolate .packageConfig)! );
3336 final ownPackage = packageConfig['web_wasm' ]! .root;
@@ -91,7 +94,7 @@ class TestAssetServer {
9194 }
9295 },
9396 'localhost' ,
94- 0 ,
97+ fixedPort ?? 0 ,
9598 );
9699
97100 return server;
Original file line number Diff line number Diff line change 11import 'package:web_wasm/driver.dart' ;
22
33void main () async {
4- await TestAssetServer .start ();
4+ await TestAssetServer .start (fixedPort : 8080 );
55 print ('Serving on http://localhost:8080/' );
66}
You can’t perform that action at this time.
0 commit comments