Explanation of `stack test --test-arguments "-m "<filter>""`

549 views Asked by At

On other forum pages, I've seen that I can run specific hspec tests with the command

stack test --test-arguments "-m "<filter>""

where <filter> is set to match it's textual descriptor for the intended tests. I frequently use this command to run single tests of interest without having to run the entire test suite.

But I do not understand how exactly this command specifies that. For instance, what kind of argument is "-m "<filter>"", and what does that "-m" mean? What other arguments can be specified as the "-m "<filter>"" is here?

About --test-arguments, stack test --help | less says only

--ta,--test-arguments TEST_ARGS
                       Arguments passed in to the test suite program

which is the only relevant documentation I have found on how to specify stack to run a subset of tests.

0

There are 0 answers