blob: 10ff8f7950b6ab327ed14561472cd25ff9ee59e3 [file]
import 'package:checks/checks.dart';
import 'package:test/scaffolding.dart';
void main() {
test('completes', () async {
// This check succeeds.
await check(Future.value(42)).completes(.it()..equals(42));
// This check fails.
await check(Future<int>.error(StateError('nope'))).completes();
// Expected: a Future<int> that:
// completes to a value
// Actual: a future that completes as an error
// Which: threw <Bad state: nope> at:
});
}