I open nvim from the flutter-monorepo directory, and when I try to run a test from any package, it looks like flutter test command is executed from that flutter-monorepo directory because I am getting errors like "Couldn't resolve the package ... in ..." for every import line.
This change will look for the flutter project of the test file that should be run and use it as the cwd for the command.
In my project, we are using monorepo, so the project structure looks like this:
I open nvim from the
flutter-monorepo
directory, and when I try to run a test from any package, it looks likeflutter test
command is executed from thatflutter-monorepo
directory because I am getting errors like "Couldn't resolve the package ... in ..." for every import line.This change will look for the flutter project of the test file that should be run and use it as the cwd for the command.