Conversation
Use @? and @?= instead, since they give much easier to read error messages. The `shouldX` functions all just end up dumping the Show instance of a HSpecFailure or what have you which is really hard to read. It also doesn't look like hspec-expectations is that actively maintained anymore
|
According to https://hackage.haskell.org/package/hspec-expectations-0.8.2/docs/Test-Hspec-Expectations.html#v:shouldBe shouldBe :: (HasCallStack, Show a, Eq a) => a -> a -> Expectation
actual `shouldBe` expected = actual @?= expectedI am confused why this displays differently? I am the one most opposed to operators such as |
|
I have no strong preference on this, but generally prefer idiomatic coding. So if we are using tasty, it makes.sense to use the tasty operators. |
It's using |
|
|
The process of searching for definitions is similar to the process of searching for hover information. In the original code (much of which was written out twice with occasional stylistic differences) the signal to noise ratio seemed pretty poor. Here is a refactoring which aims to make it easier to see the similarities and differences between these two related functionalities.
Use @? and @?= instead, since they give easier to read error messages. The
shouldXfunctions all just end up dumping the Show instance of a HSpecFailure or what have you which is hard to read. It also doesn't look like hspec-expectations is that actively maintained anymore