Skip to content
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

If dependencies is empty, add const #2310

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 16 additions & 0 deletions packages/riverpod_generator/test/dependencies_test.dart
Expand Up @@ -106,6 +106,18 @@ void main() {
transitiveDependenciesProvider.dependencies,
same(transitiveDependenciesProvider.dependencies),
);
expect(
smallTransitiveDependencyCountProvider.dependencies,
same(smallTransitiveDependencyCountProvider.dependencies),
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's not what I meant

Do same(const <ProviderOrFamily>[])

Copy link
Sponsor Contributor Author

@K9i-0 K9i-0 Mar 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I Wrote the code this way in commit cef6d9c because it is a test to check if the dependencies are cached

In commit 87a14ca, I have incorporated the feedback

Copy link
Sponsor Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rrousselGit I have responded to the comment you provided, and I would appreciate it if you could take a moment to review my response

);
expect(
emptyDependenciesStatelessProvider.dependencies,
same(emptyDependenciesStatelessProvider.dependencies),
);
expect(
emptyDependenciesStatefulProvider.dependencies,
same(emptyDependenciesStatefulProvider.dependencies),
);

expect(
provider3Provider.allTransitiveDependencies,
Expand All @@ -119,5 +131,9 @@ void main() {
transitiveDependenciesProvider.allTransitiveDependencies,
same(transitiveDependenciesProvider.allTransitiveDependencies),
);
expect(
smallTransitiveDependencyCountProvider.allTransitiveDependencies,
same(smallTransitiveDependencyCountProvider.allTransitiveDependencies),
);
});
}