I'd like flutter_test to find test files without the "_test" suffix. Where can I configure this pattern?
For python with pytest for instance, you'd change this setting in pytest.ini:
testpaths =
tests
python_files = *.py
What's the Dart way of doing this?
I have gone through your question in-depth and I found these things.
_test.dart files. And I found out that in the pubspec.yaml, they have one dependency called glob (link) which I think they used to filter the files. I went through their code and found these particular lines for it:
Link to this page
I tried to fork the repository and then change the type there but it was still showing the same test files as before. So I tried a different approach.
"dart.allowTestsOutsideTestFolder": true
But there weren't any concrete options to change the test file search pattern for it. So my conclusion is if we were able to change the search pattern then we have to change in so many places which could also break some things. Therefore I would suggest to stick to the convention of it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With