Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to rerun a test in stack

I have a project in stack with tests that I run with stack test. A test fails and the output says

...
  To rerun use: --match "/foo/must be 4/"
....

But how am I supposed to apply that?

stack test --match "/foo/must be 4/" yields Invalid option `--match`.

like image 640
peer Avatar asked Sep 01 '25 01:09

peer


1 Answers

--match "/foo/must be 4/ is supposed to be given as an argument to the compiled executable program running the test rather than Stack. Pass it to the executable by doing stack test --test-arguments '--match "/foo/must be 4/"' or stack test --ta '--match "/foo/must be 4/"'

like image 121
bradrn Avatar answered Sep 02 '25 17:09

bradrn