Fun small project that will match test file location to their respective lib file
think of the following scenario:
- You have a lib/ file with the following path:
lib/src/utils/strings.dart
and a matching test file intest/src/utils/strings_test.dart
. - You now move the lib/ file from
lib/src/utils/strings.dart
tolib/src/strings.dart
. - You now have a test file that is not matching the lib file anymore.
The script is runnable to move the 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
- clone the repo
- locate yourself in the root of your project that you want to sync
- run:
sync_test
Note: Replace path/to/sync_test.dart with the actual path to this cloned script.
- It will not update file imports
- It will only find exact file name matches