foundry icon indicating copy to clipboard operation
foundry copied to clipboard

Feature request: make the "test" config a glob patter rather than a directory

Open PaulRBerg opened this issue 2 years ago • 1 comments

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.

PaulRBerg avatar Dec 06 '22 13:12 PaulRBerg