Fun small project that will match test file location to their respective lib file.
Imagine this scenario:
- You have a lib/ file with the following path:
lib/utils/strings.dart
and a matching test file intest/utils/strings_test.dart
. - You now move the lib/ file from
lib/utils/strings.dart
tolib/strings.dart
. - You now have a test file that is not matching the lib file anymore.
The script is runnable to move the test file to match the new location of the lib file.
- Clone the repo
- Run
make install
in the root of the project- This will install the script
sync_test
globally
- This will install the script
- Clone the repo
- Run
dart pub get
in the root of the project - Run
dart pub global activate . --source path --overwrite
in the root of the project- This will install the script
sync_test
globally
- This will install the script
- locate yourself in the root of your project that you want to sync
- run:
sync_test
- It will not update file imports
- It will only find exact file name matches
If you found this project useful, you might also be interested in The Best Flutter Course On The Internet.
Your support helps me create more useful open-source projects like this one. Thank you!