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

refactor: all Mocks should be private #827

Closed
alestiago opened this issue Oct 3, 2023 · 1 comment · Fixed by #838
Closed

refactor: all Mocks should be private #827

alestiago opened this issue Oct 3, 2023 · 1 comment · Fixed by #838
Assignees
Labels
good first issue Good for newcomers refactor A code change that neither fixes a bug nor add a feature

Comments

@alestiago
Copy link
Contributor

alestiago commented Oct 3, 2023

Description

Throughout the codebase there are instances of public Mocks being used in tests.

Private Mocks benefit from:

  • Explicitly tell the reader this is only intended to use in foo_test.dart
  • Make the test file self contained
  • Avoid accidentally importing it in other test files
  • Benefit from analyzer warnings once Mocks are no longer used in the file

Additional Context

@alestiago alestiago added bug Something isn't working as expected refactor A code change that neither fixes a bug nor add a feature good first issue Good for newcomers and removed bug Something isn't working as expected labels Oct 3, 2023
@droidbg
Copy link
Contributor

droidbg commented Oct 4, 2023

@alestiago I like to pick this up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers refactor A code change that neither fixes a bug nor add a feature
Projects
Development

Successfully merging a pull request may close this issue.

2 participants