Clarify test package use on 'An introduction to unit testing' page #9931
Labels
a.cookbook
Relates to a cookbook recipe or guide
e1-hours
Effort: < 8 hrs
from.page-issue
Reported in a reader-filed concern
p2-medium
Necessary but not urgent concern. Resolve when possible.
st.triage.ltw
Indicates Lead Tech Writer has triaged
test.unit
Relates to unit testing
Page URL
https://docs.flutter.dev/cookbook/testing/unit/introduction/
Page source
https://github.com/flutter/website/tree/main/src/cookbook/testing/unit/introduction.md
Describe the problem
Per this issue, we are now recommending users that running
flutter test
to only use theflutter_test
dependency in their pubspec.yaml file. However, in this link, for unit tests, it gives the user the option to either use thetest
orflutter_test
depedency.Expected fix
We should only recommend to use the
flutter_test
dependency to ensure that we don't have any version solving issues for theflutter test
command specifically.Additional context
Because
flutter_test
depends on pinned versions oftest_api
, we can ensure that we won't have any version mismatches between the app pubspec and the flutter tool pubspec. More details can be found in the below issue:flutter test
command should require aflutter_test
ortest_api
dependency (and check for it). flutter#91107I also have a PR to ensure we check for this dependency in the app pubspec:
flutter_test
dev depedency forflutter test
command flutter#139498I would like to fix this problem.
The text was updated successfully, but these errors were encountered: