Default reporter formatters for jsspec.
classMyFormatter{staticgetdescription(){return'I write stuff to the screen';}constructor(specRunner){}}subscribe to specRunner events:
specRunner.on('fileStart'(uniqueFileRunReference,fileName)=>{});specRunner.on('fileEnd'(uniqueFileRunReference,fileName)=>{});specRunner.on('contextStart'(specRunner,context)=>{});specRunner.on('contextEnd'(specRunner,context)=>{});specRunner.on('exampleStart'(specRunner,example)=>{});specRunner.on('exampleEnd'(specRunner,example)=>{});specRunner.on('contextLevelFailure',(specRunner,exampleOrContext)=>{});specRunner.on('runEnd'(specRunner)=>{});context, example and exampleOrContext each respond to the following:
id// [For a conetxt only] a unique name for this contextdescription// the description suppliedfullDescription// the description, with all context descriptions pre-pendedkind// the class name of the objectbase// a uniq name relating to this spec file runfailure// which may be (hopefully) undefinedfailure is either an exception, or an exception converted to an object, depending on how JSSpec was run. It will have the following attributes:
constructor.namestackmessageexpected// may be emptyactual// may be emptyFormatters included:
Does nothing. Use with --format null. Can be used as a base class to create other formatters.
-fd or --format documentation. Presents a tree of execution results with checks and crosses for example results. A summary of failures are provided at the end.
-fo or --format dot. Single character output per test. With summary at the end.