Module

Test.Spec.Assertions

Package
purescript-spec
Repository
purescript-spec/purescript-spec

#AnyShow Source

newtype AnyShow a

A newtype with an unsafe Show instance for any type. Useful if you want to test a type for which you cannot provide a Show instance. Usage:

(AnyShow $ MyInt 3) `A.shouldEqual` (AnyShow $ MyInt 3)

Constructors

Instances

#expectError Source

expectError :: forall m t. MonadError Error m => m t -> m Unit

#fail Source

fail :: forall m. MonadThrow Error m => String -> m Unit

#shouldContain Source

shouldContain :: forall m f a. MonadThrow Error m => Show a => Eq a => Show (f a) => Foldable f => f a -> a -> m Unit

#shouldEqual Source

shouldEqual :: forall m t. MonadThrow Error m => Show t => Eq t => t -> t -> m Unit

#shouldNotContain Source

shouldNotContain :: forall m f a. MonadThrow Error m => Show a => Eq a => Show (f a) => Foldable f => f a -> a -> m Unit

#shouldNotEqual Source

shouldNotEqual :: forall m t. MonadThrow Error m => Show t => Eq t => t -> t -> m Unit

#shouldNotReturn Source

shouldNotReturn :: forall m t. MonadThrow Error m => Eq t => Show t => m t -> t -> m Unit

Asserts that m t does not return t

#shouldNotSatisfy Source

shouldNotSatisfy :: forall m t. MonadThrow Error m => Show t => t -> (t -> Boolean) -> m Unit

#shouldReturn Source

shouldReturn :: forall m t. MonadThrow Error m => Eq t => Show t => m t -> t -> m Unit

Asserts that m t returns t

#shouldSatisfy Source

shouldSatisfy :: forall m t. MonadThrow Error m => Show t => t -> (t -> Boolean) -> m Unit