Module: Library/Test-Helpers

Test helpers

This module hosts everything needed for tests. Abstraction over the expection engine, abstraction over the basic functions, this module is the Test toolbelt. Little to no test framework logic should be in unit tests to keep them focused on code documentation.

Source:

Methods

(static) executeTestsInternal(testEngine, moduleName, functionBlocks) → {Void}

Execute all given tests, each with a concatenated description. Descriptions will be concatenated to form an assertion statement that will have this structure: "Module - Function(): [When XXXXXXXXX,] it should YYYYYYYYY" ("When" can be omitted for assertions that are always true, thus the brackets notation)

Parameters:
Name Type Description
testEngine function

Test engine

moduleName String

Tested module description

functionBlocks Array.<Object>

Function blocks

Source:
Returns:

Nothing

Type
Void