@@ -121,14 +121,14 @@ class TestContext {
121
121
this .path = 'hello_world/index.html' ,
122
122
this .pathToServe = 'example' ,
123
123
}) {
124
- final packageName = nullSafety == NullSafety .sound ? '_testSound' : '_test' ;
125
- final relativeDirectory = p.join ('..' , 'fixtures' , packageName);
124
+ final defaultPackage =
125
+ nullSafety == NullSafety .sound ? '_testSound' : '_test' ;
126
+ final defaultDirectory = p.join ('..' , 'fixtures' , defaultPackage);
127
+ final defaultEntry = p.join ('..' , 'fixtures' , defaultPackage, 'example' ,
128
+ 'append_body' , 'main.dart' );
126
129
127
- final relativeEntry = p.join (
128
- '..' , 'fixtures' , packageName, 'example' , 'append_body' , 'main.dart' );
129
-
130
- workingDirectory = p.normalize (p
131
- .absolute (directory ?? p.relative (relativeDirectory, from: p.current)));
130
+ workingDirectory = p.normalize (
131
+ p.absolute (p.relative (directory ?? defaultDirectory, from: p.current)));
132
132
133
133
DartUri .currentDirectory = workingDirectory;
134
134
@@ -138,7 +138,7 @@ class TestContext {
138
138
p.toUri (p.join (workingDirectory, '.dart_tool/package_config.json' ));
139
139
140
140
final entryFilePath = p.normalize (
141
- p.absolute (entry ?? p. relative (relativeEntry , from: p.current)));
141
+ p.absolute (p. relative ( entry ?? defaultEntry , from: p.current)));
142
142
143
143
_logger.info ('Serving: $pathToServe /$path ' );
144
144
_logger.info ('Project: $_projectDirectory ' );
0 commit comments