forked from firka/flutter
Fix state in test (#48269)
This commit is contained in:
@@ -165,7 +165,11 @@ void main() {
|
||||
});
|
||||
|
||||
group('getRepoPackages', () {
|
||||
String oldFlutterRoot;
|
||||
|
||||
setUp(() {
|
||||
oldFlutterRoot = Cache.flutterRoot;
|
||||
Cache.flutterRoot = _kFlutterRoot;
|
||||
fs.directory(fs.path.join(_kFlutterRoot, 'examples'))
|
||||
.createSync(recursive: true);
|
||||
fs.directory(fs.path.join(_kFlutterRoot, 'packages'))
|
||||
@@ -179,6 +183,10 @@ void main() {
|
||||
.createSync();
|
||||
});
|
||||
|
||||
tearDown(() {
|
||||
Cache.flutterRoot = oldFlutterRoot;
|
||||
});
|
||||
|
||||
testUsingContext('', () {
|
||||
final List<String> packagePaths = runner.getRepoPackages()
|
||||
.map((Directory d) => d.path).toList();
|
||||
|
||||
Reference in New Issue
Block a user