onflow/flow-cli

Allow specifying individual specific tests to run with `flow test`

jribbink opened this issue · 0 comments

Issue To Be Solved

It would be useful to have the ability to specify an individual test to run when using the flow test command.

I.e. for

access(all) fun testFoobar() {
...
}

access(all) fun testBarFoo() {
...
}

It would be nice to be able to just run one of these tests instead of all of them.

(Optional): Suggest A Solution

Add a flag like --run to flow test. From here a user could specify a regular expression to match against test functions & filter the tests which they wish to run.

(Optional): Context

This is important for any IDE/external tooling supporting of the Cadence test framework. Specifically, to integrate with the VSCode Testing API, it's important to have the ability to target individual test runs beyond a file/folder level.