producesError function

Matcher producesError([
  1. Object? matcher
])

Matches a Rill that fails with an error satisfying matcher.

If matcher is omitted, any non-null error matches. The Rill must fail — a successful or canceled run causes the test to fail.

expect(Rill.raiseError('oops'), producesError(isA<String>()));

Implementation

Matcher producesError([Object? matcher]) => _ProducesError(matcher ?? anyOf(isNotNull, isNull));