-
Notifications
You must be signed in to change notification settings - Fork 223
Language PureScript
kazk edited this page Oct 10, 2018
·
9 revisions
Beta
The name of the solution module can be arbitrary. Extra module can be provided in preloaded code.
module Example where
import Prelude
add' :: Int -> Int -> Int
add' x y = x + yThe name of the test module must end with Spec.
module ExampleSpec where
import Prelude
import Test.Spec (Spec, describe, it)
import Test.Spec.Assertions (shouldEqual)
import Example (add')
spec :: Spec Unit
spec =
describe "Example" do
describe "add'" do
it "returns sum" do
(add' 1 1) `shouldEqual` 2QuickCheck is supported.
module QuickCheckExampleSpec where
import Prelude
import Test.QuickCheck ((===))
import Test.Spec (Spec, describe, it)
import Test.Spec.QuickCheck (quickCheck)
spec :: Spec Unit
spec =
describe "QuickCheck" do
it "works" $
quickCheck \n -> (n * 2 / 2) === n12 seconds
preludeconsoleeffect-
specspec-discoveryspec-quickcheck
Packages are managed with psc-package using package set psc-0.12-0-20181005. See packages.json for versions.
Feel free to open issues for additional packages.
None