Module

Test.Spec.Assertions

#AnyShow

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

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

#fail

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

#shouldContain

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

#shouldEqual

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

#shouldNotContain

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

#shouldNotEqual

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

#shouldNotReturn

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

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

#shouldReturn

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

Asserts that m t returns t

#shouldSatisfy

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

Modules