Module test
Creates a stack trace and parses it for display.
Parameters
| java.lang.StackTraceElement |
trace |
The trace to parse. If not given
a stacktrace will be generated |
Returns
| String |
The parsed stack trace |
Returns the type of the object passed as argument. This is
heavily inspired by http://philrathe.com/articles/equiv and
tlrobinson's narwhal test module (http://github.com/tlrobinson/narwhal/)
Returns
| String |
The type of the object passed as argument |
jsDump
(value, lvl)
Converts the value passed as argument into a nicely formatted and
indented string
Parameters
| Object |
value |
The value to convert into a string |
| Number |
lvl |
Optional indentation level (defaults to zero) |
Returns
| String |
The string representation of the object passed as argument |
run
(scope, name, writer)
The main runner method. This method can be called with one, two or three
arguments: run(scope), run(scope, nameOfTest),
run(scope, writer) or run(scope, nameOfTest, writer)
Parameters
| String|Object |
scope |
Either the path to a module containing unit
tests to execute, or an object containing the exported test methods or nested scopes. |
| String |
name |
Optional name of a test method to execute |
| Object |
writer |
Optional writer to use for displaying the test results. Defaults
to TermWriter. |