-
Notifications
You must be signed in to change notification settings - Fork 221
Language Haskell
kazk edited this page Jun 16, 2020
·
6 revisions
- GHC 7.10.3 (LTS Haskell 6.24)
- GHC 8.2.2 (LTS Haskell 10.4)
Codewars (wraps Hspec)
Note that tests written for 7.10.3 are not compatible with 8.2.2.
module ExampleSpec where
import Test.Hspec
import Example
spec :: Spec
spec = do
describe "add" $ do
it "adds Nums" $ do
(add 1 1) `shouldBe` (2 :: Integer)
-- Adding the following line might make this compatible with 7.10
main = hspec spec
The test module's name must end with Spec
. Spec
by itself is not allowed.
Examples: ExampleSpec
, Example.ExampleSpec
are allowed while Spec
, Example.Spec
, ExampleTest
, Example.KataTest
are not.
The common convention is: If the solution's module name is e.g. YourKata.SomeTask
, just add Spec
to the end without a dot, e.g. YourKata.SomeTaskSpec
.
12 seconds
- esqualeto
- haskell-src-exts
- ifelse
- lens
- parsec
- persistent-sqlite
- persistent-template
- split
- split
- lens
- transformers
- mtl
- text
- vector
- random
- parsec
- megaparsec
- hspec-megaparsec
- attoparsec
- hspec-attoparsec
- regex-pcre
- regex-tdfa
- regex-posix
- hspec
- hspec-codewars
- hspec-contrib
- HUnit-approx
- haskell-src-exts
None
haskell