mitchellwrosen / tasty-hspec

Hspec provider for tasty
Other
15 stars 10 forks source link

`tasty-hspec` doesn't respect --hide-successes #16

Closed parsonsmatt closed 6 years ago

parsonsmatt commented 6 years ago

See tasty #213 for original discussion.

tasty-hspec apparently prints out all of the tests when --hide-successes is passed on the command-line. This is not the intended behavior of the flag -- it should hide the entire test, not just the successful output.

mitchellwrosen commented 6 years ago

Indeed the only options from OptionSet we respect are QuickCheck and SmallCheck pass-thrus - none of the built-in options from https://hackage.haskell.org/package/tasty-1.0.1/docs/Test-Tasty-Options.html#t:IsOption:

mitchellwrosen commented 6 years ago

Hm, @feuerbach could you please clarify why you think this is an issue with tasty-hspec? This package only re-jiggers an hspec spec into a tasty tree, but is not responsible for top-level "run" configurations, like hiding the output of successful tests.

But in addition, I was unable to reproduce the issue with this test suite:

import Test.Hspec
import Test.Tasty
import Test.Tasty.Hspec

spec :: Spec
spec =
  it "does something" $
    1 `shouldBe` 1

main :: IO ()
main = do
  tree <- testSpec "hspec suite" spec
  defaultMain tree

When I run e.g. stack test --test-arguments=--hide-successes, I see no indication that a test named "does something" was run. It just says 1 test passed.

UnkindPartition commented 6 years ago

Sorry, that was just my guess — I didn't try to reproduce the issue. It could be that the output is coming from somewhere else in the test suite.

mitchellwrosen commented 6 years ago

@parsonsmatt Any update on this?

mitchellwrosen commented 6 years ago

I'm going to close this out as I couldn't reproduce, but please re-open if I've overlooked something.