-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listc: tech-debtTechnical debt, code quality, testing, etc.Technical debt, code quality, testing, etc.team-toolOwned by Flutter Tool teamOwned by Flutter Tool teamtriaged-toolTriaged by Flutter Tool teamTriaged by Flutter Tool team
Description
See title.
We have tests related to the --dart-define-from-file option in both build_bundle_test.dart and assemble_test.dart. This option does not function differently under these the flutter build bundle and flutter assemble commands, so it would make more sense to group all of these tests together into flutter_command.dart, where the --dart-define-from-file functionality is implemented.
In addition, there are some things about these tests that we should fix:
- There are multiple tests that make sure we tool exit when
--dart-define-from-fileis given a malformed file (e.g. invalid JSON). Their titles don't differentiate themselves from each other, which can be confusing. These tests should either be merged into a singletestcall or be given better names and be grouped together into agroup. - Nit: Some tests could have better names. The names state what is under test, but not what the expected result is.
- There is behavior not under test. Specifically, the case where we are unable to parse an .env file (fun fact, we consider any file that doesn't start with
{to be an.envfile 🙃).
Lastly, while this is not related to the tests, we probably should change the error message printed when the user provides malformed JSON. Currently, we yell at the user.
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listc: tech-debtTechnical debt, code quality, testing, etc.Technical debt, code quality, testing, etc.team-toolOwned by Flutter Tool teamOwned by Flutter Tool teamtriaged-toolTriaged by Flutter Tool teamTriaged by Flutter Tool team