-
Notifications
You must be signed in to change notification settings - Fork 170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expect unawaited futures in test.expect (attempt to fix #419) #430
Conversation
expect(fut(), throws); // Ok!
bb52d0f
to
9d80b45
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this will work. Summaries record where the data came from, so they are able to re-create the Source associated with a library.
An alternative would be #419 (comment) to allow APIs themselves to opt out instead of special-casing in the linter rule. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit...
if (libUri == null) return false; | ||
|
||
return libUri.startsWith('package:test/') || | ||
libUri.startsWith('package:unittest/'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need the unittest
check here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(not that it matters anymore, but fyi most our tests are still using unittest :-))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's hold off on this. I have some open discussions on the recent change to pkg/test
.
@kevmoo : is that conversation on an issue somewhere? If not, could you post status somewhere we can follow? |
Thanks @kevmoo . I think as of dart-lang/test#546, this becomes moot and @ochafik you can safely close this? |
Cool, closing this, thanks! |
Note: I couldn't find an easy way to test the package origin from the tests themselves, suggestions welcome! Also, not sure if that will work with summaries (do we still have sourcefiles then?), etc... Pointers as to how to test would be welcome!