-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Labels
a: tests"flutter test", flutter_test, or one of our tests"flutter test", flutter_test, or one of our testsc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.team-frameworkOwned by Framework teamOwned by Framework team
Description
Is there an existing issue for this?
- I have searched the existing issues
- I have read the guide to filing a bug
Use case
Consider a code like this:
Future<Uint8List?> firstThumbnail(...) async {
...
}
And a test like this:
await expectLater(
firstThumbnail(),
matchesGoldenFile('expected'));
This test will pass in weak null safety mode, but will fail in sound null safety mode with an error:
Assertion failed: "must provide a Finder, Image, Future<Image>, List<int>, or Future<List<int>>"
package:flutter_test/src/_matchers_io.dart 98:7 MatchesGoldenFile.matchAsync
package:matcher expectLater
package:flutter_test/src/widget_tester.dart 495:25 expectLater
Proposal
Check for item is Future<List<int>?> instead of item is Future<List<int>>.
Metadata
Metadata
Assignees
Labels
a: tests"flutter test", flutter_test, or one of our tests"flutter test", flutter_test, or one of our testsc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.team-frameworkOwned by Framework teamOwned by Framework team