You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-1: some expectations
Expected: throws <42>
Actual: <Instance of 'Future<dynamic>'>
Which: threw <21>
stack
package:test_api OutstandingWork.complete
The problem is, this doesn't tell us which specific expectation in our test is at fault.
In the given example, there are two expectations, both of which have the exact same stacktrace if they were to fail.
I am aware that await expectLater would fix this. But mistakes happen and we may use expect instead of expectLater when it'd help.
And the "await" may change the test's behavior, so those aren't strictly equivalent either.
The text was updated successfully, but these errors were encountered:
Consider:
When this test fails, the console will render:
The problem is, this doesn't tell us which specific expectation in our test is at fault.
In the given example, there are two expectations, both of which have the exact same stacktrace if they were to fail.
I am aware that
await expectLater
would fix this. But mistakes happen and we may useexpect
instead ofexpectLater
when it'd help.And the "await" may change the test's behavior, so those aren't strictly equivalent either.
The text was updated successfully, but these errors were encountered: