foundry icon indicating copy to clipboard operation
foundry copied to clipboard

make `forge test file_path` the same as `forge test --match-path file_path`

Open zhiqiangxu opened this issue 1 year ago • 5 comments

Component

Forge

Describe the feature you would like

Now that forge script file_path works, there seems to be no good reason why forge test file_path doesn't work. It should behave the same as forge test --match-path file_path.

Additional context

No response

zhiqiangxu avatar Aug 26 '24 08:08 zhiqiangxu

Hi @zhiqiangxu thanks for your suggestion, I tend to agree this would be beneficial. Is this something you would like to work on?

zerosnacks avatar Aug 26 '24 09:08 zerosnacks

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

Hi please i will love to be given the opportunity to contribute to this rep,i am a blockchain developer html ,css ,react javascript typescript ,python

How I plan on tackling this issue

To solve this problem i would implement the following :

  1. Align Functionality: Modify the forge test command to accept a direct file path, making it function similarly to forge test --match-path file_path.

  2. Implement File Path Handling: Update the command to recognize and process the provided file path, ensuring it runs tests only within that specified file.

  3. Consistency Check: Ensure that the behavior of forge test file_path is consistent with forge script file_path to provide a unified experience. i will come up with a PR within 3-5 working days once i am assigned . please assign this issue to me i am ready to work

ShantelPeters avatar Aug 26 '24 10:08 ShantelPeters

Hi @zhiqiangxu thanks for your suggestion, I tend to agree this would be beneficial. Is this something you would like to work on?

@zerosnacks I just created a PR here, pls take a look:)

zhiqiangxu avatar Aug 27 '24 09:08 zhiqiangxu