#Test Source

type Test = Aff Unit

#Group Source

data Group


#TestSuite Source

#TestList Source

type TestList = List (Tuple (List String) (Test))

A list of collected tests, represented as a tuple of each test's path and the Test itself. The path, in this case, means the name of the test preceded by the name of each parent test suite, in top down order.

#Skip Source

newtype Skip



#Only Source

newtype Only



#success Source

success :: Test

The basic value for a succeeding test.

#failure Source

failure :: String -> Test

Make a failing test, given a reason for the failure.

#timeout Source

timeout :: Int -> Test -> Test

Set a test to fail after a given number of milliseconds.

#test Source

test :: String -> Test -> TestSuite

Define a labelled test.

#testOnly Source

testOnly :: String -> Test -> TestSuite

Run only this test.

#testSkip Source

testSkip :: String -> Test -> TestSuite

Skip a test.

#suite Source

suite :: String -> TestSuite -> TestSuite

Define a test suite, which can contain a number of nested suites as well as tests.

#suiteOnly Source

suiteOnly :: String -> TestSuite -> TestSuite

Run only this suite.

#suiteSkip Source

suiteSkip :: String -> TestSuite -> TestSuite

Skip this suite.

#walkSuite Source

walkSuite :: (List String -> Either String (Tuple String Test) -> Aff Unit) -> TestSuite -> Aff TestList

Walk through a test suite, calling the provided function for each item, and returning a TestList of all tests walked. The tests won't actually run unless you run them explicitly from your walker function.

#filterTests Source

filterTests :: (Free TestF) ~> (Free TestF)

Filter suites and tests with Only and Skip flags and removes suites that do not contain any tests.

#collectTests Source

collectTests :: TestSuite -> Aff TestList

Walk through a test suite, returning a TestList of all tests walked. This operation will not actually run the tests.

#collectResults Source

collectResults :: TestList -> Aff (List (Tuple (List String) (Either Error Unit)))

Run a list of tests and collect each test result.

#countSkippedTests Source

countSkippedTests :: forall a. Free TestF a -> Int

#keepErrors Source

keepErrors :: List (Tuple (List String) (Either Error Unit)) -> List (Tuple (List String) Error)

Filter successes out of a list of test results.

#describe Source

describe :: String -> TestSuite -> TestSuite

describe is an alias for suite for BDD enthusiasts.

#it Source

it :: String -> Test -> TestSuite

it is an alias for test for BDD enthusiasts.