Testing
Elfenben comes with some built in testing features to let you test your code while developing. However if you find that the features offered in the built in tests are not enough, you can use any of the javascript test frameworks available.
assert
(assert (expression) "string message")
The expression must evaluate to "true" and not something truthy, and will return the message with "Passed " or "Failed " added to your message.
testgroup
(testGroup name (assert1) (assert2) ...)
Create test groups by calling the testGroup expression. It takes a name and one or more asserts. It creates a testGroup which is invoked by the testRunner.
testRunner
(testRunner groupname "Desription")
Call testRunner to invoke your test group. Pass it the name of the test group and a string description which will be shown at the top of your test results. It returns the test results as a string.