@@ -8,8 +8,10 @@ import 'package:flutter_tools/src/base/file_system.dart';
8
8
import 'package:flutter_tools/src/base/io.dart' ;
9
9
import 'package:flutter_tools/src/base/platform.dart' ;
10
10
import 'package:flutter_tools/src/build_info.dart' ;
11
+ import 'package:flutter_tools/src/dart/pub.dart' ;
11
12
import 'package:flutter_tools/src/devfs.dart' ;
12
13
import 'package:flutter_tools/src/device.dart' ;
14
+ import 'package:flutter_tools/src/features.dart' ;
13
15
import 'package:flutter_tools/src/reporting/reporting.dart' ;
14
16
import 'package:flutter_tools/src/resident_devtools_handler.dart' ;
15
17
import 'package:flutter_tools/src/resident_runner.dart' ;
@@ -20,10 +22,19 @@ import 'package:vm_service/vm_service.dart' as vm_service;
20
22
21
23
import '../src/common.dart' ;
22
24
import '../src/context.dart' ;
25
+ import '../src/fake_pub_deps.dart' ;
23
26
import '../src/fakes.dart' ;
24
27
import 'hot_shared.dart' ;
25
28
26
29
void main () {
30
+ // TODO(matanlurey): Remove after `explicit-package-dependencies` is enabled by default.
31
+ // See https://github.com/flutter/flutter/issues/160257 for details.
32
+ FeatureFlags enableExplicitPackageDependencies () {
33
+ return TestFeatureFlags (
34
+ isExplicitPackageDependenciesEnabled: true ,
35
+ );
36
+ }
37
+
27
38
group ('validateReloadReport' , () {
28
39
testUsingContext ('invalid' , () async {
29
40
expect (HotRunner .validateReloadReport (vm_service.ReloadReport .parse (< String , dynamic > {
@@ -160,6 +171,8 @@ void main() {
160
171
FileSystem : () => fileSystem,
161
172
Platform : () => FakePlatform (),
162
173
ProcessManager : () => FakeProcessManager .any (),
174
+ FeatureFlags : enableExplicitPackageDependencies,
175
+ Pub : FakePubWithPrimedDeps .new ,
163
176
});
164
177
165
178
testUsingContext ('setupHotReload function fails' , () async {
@@ -202,6 +215,8 @@ void main() {
202
215
FileSystem : () => fileSystem,
203
216
Platform : () => FakePlatform (),
204
217
ProcessManager : () => FakeProcessManager .any (),
218
+ FeatureFlags : enableExplicitPackageDependencies,
219
+ Pub : FakePubWithPrimedDeps .new ,
205
220
});
206
221
});
207
222
0 commit comments