-
-
Notifications
You must be signed in to change notification settings - Fork 959
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
Don't trigger provider scoped lints in tests #3056
Don't trigger provider scoped lints in tests #3056
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #3056 +/- ##
==========================================
+ Coverage 95.29% 95.30% +0.01%
==========================================
Files 53 53
Lines 2274 2281 +7
==========================================
+ Hits 2167 2174 +7
Misses 107 107 |
c3fc922
to
005009a
Compare
d0b6658
to
9ca4115
Compare
9ca4115
to
4a22b7f
Compare
@@ -14,3 +14,4 @@ dependency_overrides: | |||
path: ../riverpod_annotation | |||
riverpod_lint: | |||
path: ../riverpod_lint | |||
test_api: ^0.6.1 |
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.
Why is this needed?
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.
flutter_test
has a pinned dependency on test_api: 0.6.0
but the test
package needs test_api: ^0.61
. Needed to do this to get the packages all playing nicely.
void someTestFunction() { | ||
testWidgets('override repositoryProvider in test', (tester) async { | ||
await tester.pumpWidget( | ||
ProviderScope( |
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.
We need a test where ProviderScope
is not prevent in pumpWidget
And one where ProviderScope
is prevent within pumpWidget, but is not the very first widget
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.
Wil do, slick!
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.
Added some more tests covering these cases.
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.
LGTM once a few extra test cases are added
Looking good, thanks! |
Updates the
scoped_providers_should_specify_dependencies
to ignore instances of using pumpWidget in tests