-
Notifications
You must be signed in to change notification settings - Fork 236
Closed
Labels
good first issueGood for newcomersGood for newcomersrefactorA code change that neither fixes a bug nor add a featureA code change that neither fixes a bug nor add a feature
Description
Description
Throughout the codebase there are many instances where a class has optional parameters to allow dependency injection during testing, these should be annotated with visibleForTesting.
For example:
// lib/src/commands/create/commands/create_subcommand.dart
CreateSubCommand({
required Analytics analytics,
required this.logger,
required MasonGeneratorFromBundle? generatorFromBundle,
required MasonGeneratorFromBrick? generatorFromBrick,
})We should intentionally and explicitly denote these as visibleForTesting as:
// lib/src/commands/create/commands/create_subcommand.dart
CreateSubCommand({
required Analytics analytics,
required this.logger,
@visibleForTesting required MasonGeneratorFromBundle? generatorFromBundle,
@visibleForTesting required MasonGeneratorFromBrick? generatorFromBrick,
})Expected Behavior
- To have all parameters that are used exclusively for testing purposes be annotated with visibleForTesting.
Additional Context
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomersrefactorA code change that neither fixes a bug nor add a featureA code change that neither fixes a bug nor add a feature
Type
Projects
Status
Done