From 8c79ff7f801ee2a98e228d82a1c97bac34bda52a Mon Sep 17 00:00:00 2001 From: Jake Macdonald Date: Wed, 9 Mar 2022 07:14:18 -0800 Subject: [PATCH] fix build_resolvers test --- build_resolvers/test/resolver_test.dart | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/build_resolvers/test/resolver_test.dart b/build_resolvers/test/resolver_test.dart index 09cf2fdc3..b512872ee 100644 --- a/build_resolvers/test/resolver_test.dart +++ b/build_resolvers/test/resolver_test.dart @@ -195,13 +195,14 @@ void main() { }, test, resolvers: AnalyzerResolvers()); } + final otherId = AssetId.parse('a|lib/other.dart'); + test('can be resolved', () { return _runWith((resolver) async { final main = await resolver.libraryFor(entryPoint); expect(main, isNotNull); - final other = - await resolver.libraryFor(AssetId.parse('a|lib/other.dart')); + final other = await resolver.libraryFor(otherId); expect(other.name, 'other'); }); }); @@ -211,19 +212,19 @@ void main() { await expectLater( resolver.libraries.map((l) => l.name), neverEmits('other')); - await resolver.libraryFor(entryPoint); + await resolver.libraryFor(otherId); await expectLater( - resolver.libraries.map((l) => l.name), emits('other'), - skip: 'https://github.com/dart-lang/build/issues/3256'); + resolver.libraries.map((l) => l.name), emitsThrough('other')); }); }); test('can be found by name', () { return _runWith((resolver) async { - await resolver.libraryFor(entryPoint); + await resolver.libraryFor(otherId); - expect(resolver.findLibraryByName('other'), completion(isNotNull)); + await expectLater( + resolver.findLibraryByName('other'), completion(isNotNull)); }); }); });