-
Notifications
You must be signed in to change notification settings - Fork 10
output API
titulus edited this page Sep 12, 2013
·
5 revisions
test.it framework use strategy pattern for separating output modules from core. They are called printers. You need to know it's simple API to write your own printer (e.g. into the page DOM).
To tell the truth, for that moment (v1.2.1), there is only one public method .print() used by core. But you must implement all of them, for reason of providing future releases.
-
.print( value )- checks.typeof value, and if it: -
.test( test )- outputstest -
.group( group )- outputsgroup -
.error( error )- outputserror
-
test.it-firebug - outputs via Web Console API.
Example in Google Chrome
-
test.it-nodej - outputs via console in node.js
Example in WindowsXP shell