Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix build_resolvers tests #3257

Merged
merged 1 commit into from Mar 9, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 8 additions & 7 deletions build_resolvers/test/resolver_test.dart
Expand Up @@ -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');
});
});
Expand All @@ -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));
});
});
});
Expand Down