Feature request: make the "test" config a glob patter rather than a directory
Component
Forge
Describe the feature you would like
The test property in the Foundry config is currently a simple path to a directory. My request is turn it into a glob pattern to enable selective exclusion of certain paths (e.g. fork tests), though there may be multiple use cases depending upon each user's situation.
Take the following directory structure:
test
├── e2e
├── integration
└── unit
It is not currently possible to make Forge run the tests only in the integration and unit directories, but this is useful in a non-CI environment. It is only possible to run the tests in either the integration and the unit. The following configuration doesn't work:
test = "test/{integration,unit}"
Adding support for glob patterns should be easy, because there wouldn't be any breaking change. A simple directory path is still a glob pattern.
As a solution in the interim, it looks like we could use the --no-match-path flag:
$ forge test --no-match-path "test/e2e/**/*.sol"
closing as not planned in favour of --no-match-path . Thanks