Skip to content

producesError

MatcherproducesError([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.

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