-
Notifications
You must be signed in to change notification settings - Fork 338
Closed
Labels
Description
Currently, when running flutter test, one has to run it in the root directory of a Flutter project, but the working directory when running the test is the directory of the test file. When running tests through Dart-Code via the GUI interface in the code/Running tests inside VS Code in general, the working directory is instead the root directory.
Repro Steps:
- Create a new Flutter project called
testingin VS Code via the command palette. - In the default
widget_test.dartfile created, importdart:ioand add the following print statement inside the default testprint(Directory.current); - Run the test inside VS Code either through the circled
Runbutton
or from the panel on the left. - The output in the Debug Console is
testing. - Running
flutter testthrough the flutter console manually in the root directory results in the output beingtesting/test
Is there a reason for this difference in behavior?