-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Change test
to flutter_test
on the 'An introduction to unit testing' page
#5372
Comments
Hey @sfshaza2 can I work on the issue? |
Yup! But does this page use code excerpts? If so, that requires special handling. |
test
to flutter_test
on the 'An introduction to unit testing' page
This should replace:
Change lines 18 to 19. To clarify, the page should state: You need the [`flutter_test`](https://pub.dev/packages/test).
It contains the [`test`](https://api.flutter.dev/flutter/flutter_test/flutter_test-library.html)
package and provides utilities for testing widgets. Replace |
Sure, no problems here. My goal was to indicate that unit tests are separate from flutter tests, and that there are many cases where you may want to test business logic independent of Flutter. Therefore, using raw I don't feel strongly, however, if you think this is a better direction. |
Fixed in #8950 |
Page URL: https://docs.flutter.dev/cookbook/testing/unit/introduction
Page source: https://github.com/flutter/website/tree/master/src/docs/cookbook/testing/unit/introduction.md
Description of issue:
The lines 35 to 45 are misleading and will not yield working code. The documentation introduces 2 problems that will be confusing for beginners:
When adding dependencies, the name of the file to modify is missing. It should be
pubsec.yaml
.When suggesting what to put in the file the documentation in line 43 recommends
test: <latest_version>
- which will not compile. Instead the entry needs to look like this:The text was updated successfully, but these errors were encountered: