1

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.

mherzl
  • 5,624
  • 6
  • 34
  • 75
  • 3
    Is [this](http://hspec.github.io/options.html) what you are looking for? Stack just passes `test-arguments` to the testing library, so it makes sense `stack test --help` wouldn't be able to tell you the options `hspec` has. – Alec Sep 07 '17 at 17:38
  • @Alec I hadn't seen that, thanks. – mherzl Sep 07 '17 at 17:39

0 Answers0