spec
spec copied to clipboard
[Question] Does this support passing individual test files/directories?
I tried running my tests by simply calling spec
in the root folder and it only picked up tests in a packages/test
folder and ignored the ones in the main test
folder.
When I pass individual test files as I would with flutter_test
as in flutter test test/path/to_test.dart
, Spec does not find the tests and runs nothing.
Is using melos
in this case required or is there an option I have not yet found?
Hello!
Could you better describe your folder architecture? I'm not sure I understand how your project looks like
@rrousselGit we have a standard Flutter app folder layout.
- android/
- ios/
- lib/
- packages/
- test/
- some_test.dart
- folder1/
- folder1_test.dart
- folder2/
- folder2_test.dart
- pubspec.yaml
The packages
folder
packages/
- api_client/
- lib/
- test/
- first_test.dart
- second_test.dart
- pubspec.yaml
The spec_cli
only picks up the tests in the packages
folder.
I don't think melos supports both having a root pubspec and a packages folder simultaneously
But I'm sure it could be adapted to do so cc @Salakar
We're not using melos, though.
Spec does for you.
Ah, ok
I don't think melos supports both having a root pubspec and a packages folder simultaneously
But I'm sure it could be adapted to do so cc @Salakar
It does support this, even Melos repo itself is setup like this 🤔
As the default format - aka without a melos.yaml?
As the default format - aka without a melos.yaml?
Ah no it does not, easy change though by adding another glob here: https://github.com/invertase/melos/blob/main/packages/melos/lib/src/workspace_configs.dart#L516-L522