[flutter_tools] remove pub dependencies from universal (#97722)
This commit is contained in:
@@ -74,7 +74,7 @@ class PubDependencies extends ArtifactSet {
|
||||
}) : _logger = logger,
|
||||
_flutterRoot = flutterRoot,
|
||||
_pub = pub,
|
||||
super(DevelopmentArtifact.universal);
|
||||
super(DevelopmentArtifact.web);
|
||||
|
||||
final String Function() _flutterRoot;
|
||||
final Logger _logger;
|
||||
|
||||
@@ -319,6 +319,17 @@ void main() {
|
||||
|
||||
expect(() => cache.storageBaseUrl, throwsToolExit());
|
||||
});
|
||||
|
||||
testWithoutContext('PubDependencies should be registered as web based', () async {
|
||||
final BufferLogger logger = BufferLogger.test();
|
||||
final PubDependencies pubDependencies = PubDependencies(
|
||||
flutterRoot: () => '',
|
||||
logger: logger,
|
||||
pub: () => FakePub(),
|
||||
);
|
||||
|
||||
expect(pubDependencies.developmentArtifact, DevelopmentArtifact.web);
|
||||
});
|
||||
});
|
||||
|
||||
testWithoutContext('flattenNameSubdirs', () {
|
||||
@@ -1076,19 +1087,6 @@ class FakeSimpleArtifact extends CachedArtifact {
|
||||
Future<void> updateInner(ArtifactUpdater artifactUpdater, FileSystem fileSystem, OperatingSystemUtils operatingSystemUtils) async { }
|
||||
}
|
||||
|
||||
class FakeDownloadedArtifact extends CachedArtifact {
|
||||
FakeDownloadedArtifact(this.downloadedFile, Cache cache) : super(
|
||||
'fake',
|
||||
cache,
|
||||
DevelopmentArtifact.universal,
|
||||
);
|
||||
|
||||
final File downloadedFile;
|
||||
|
||||
@override
|
||||
Future<void> updateInner(ArtifactUpdater artifactUpdater, FileSystem fileSystem, OperatingSystemUtils operatingSystemUtils) async { }
|
||||
}
|
||||
|
||||
class FakeSecondaryCachedArtifact extends Fake implements CachedArtifact {
|
||||
bool upToDate = false;
|
||||
bool didUpdate = false;
|
||||
|
||||
Reference in New Issue
Block a user