Sloth is a testing framework for Elm. It is inspired from the Node.js module Mocha.
module MyTest where
import Sloth exposing (..)
import Sloth.Assertion exposing (..)
tests =
start
`describe` "description"
`it` "should pass" =>
(1 `shouldBe` 1)
`it` "should fail" =>
(1 `shouldNotBe` 1)
`end` 1- Get
slothcommand from npm:
$ npm i -g sloth.elm- Create a folder for test files:
$ mkdir test- And use
elm-packageto installpoying/sloth.elm:
$ cd test
$ elm-package install poying/sloth.elm