Unverified Commit d73b3682 authored by Dan Field's avatar Dan Field Committed by GitHub

Fix state in test (#48269)

parent 79c4c38c
...@@ -165,7 +165,11 @@ void main() { ...@@ -165,7 +165,11 @@ void main() {
}); });
group('getRepoPackages', () { group('getRepoPackages', () {
String oldFlutterRoot;
setUp(() { setUp(() {
oldFlutterRoot = Cache.flutterRoot;
Cache.flutterRoot = _kFlutterRoot;
fs.directory(fs.path.join(_kFlutterRoot, 'examples')) fs.directory(fs.path.join(_kFlutterRoot, 'examples'))
.createSync(recursive: true); .createSync(recursive: true);
fs.directory(fs.path.join(_kFlutterRoot, 'packages')) fs.directory(fs.path.join(_kFlutterRoot, 'packages'))
...@@ -179,6 +183,10 @@ void main() { ...@@ -179,6 +183,10 @@ void main() {
.createSync(); .createSync();
}); });
tearDown(() {
Cache.flutterRoot = oldFlutterRoot;
});
testUsingContext('', () { testUsingContext('', () {
final List<String> packagePaths = runner.getRepoPackages() final List<String> packagePaths = runner.getRepoPackages()
.map((Directory d) => d.path).toList(); .map((Directory d) => d.path).toList();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment