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
Describe the bug
The scoped_providers_should_specify_dependencies lint from the riverpod_lint warning gets triggered when running unit tests with ProviderScope.
To Reproduce
This happens for the example test from the docs.
testWidgets('override repositoryProvider', (tester) async {
await tester.pumpWidget(
ProviderScope(
overrides: [
// Override the behavior of repositoryProvider to return// FakeRepository instead of Repository.
repositoryProvider.overrideWithValue(FakeRepository())
// We do not have to override `todoListProvider`, it will automatically// use the overridden repositoryProvider
],
child:MyApp(),
),
);
});
Expected behavior
No warning should be generated as this is the reccomended way to override behaviour during a test.
The text was updated successfully, but these errors were encountered:
Closing as this is not a bug now that I look a little closer, this is more of an issue that I need to specify the dependencies in the test file. Will read #2913 and see if that helps.
Describe the bug
The
scoped_providers_should_specify_dependencies
lint from theriverpod_lint
warning gets triggered when running unit tests withProviderScope
.To Reproduce
This happens for the example test from the docs.
Expected behavior
No warning should be generated as this is the reccomended way to override behaviour during a test.
The text was updated successfully, but these errors were encountered: