frankendoc
Version:
bringing documents alive
49 lines (36 loc) • 1 kB
text/coffeescript
{ Stats } = require './stats'
class
icons:
passed: ' √ '
failed: ' x '
pending: ' o '
colors:
passed: 92
failed: 91
pending: 93
color: (text) -> '\u001b[' + [] + 'm' + text + '\u001b[0m'
start: ->
()
= new Stats
suite: ->
running: () ->
.start()
finished: () ->
return unless .length
= .stop
()
()
report_doc: ->
console.log [] + + ' (' + .duration + 'ms)'
report_unsuccessful_steps: ->
console.log ' ' + msg for msg in .messages()
stop: ->
()
console.log(
.docs + ' docs, ' +
.passed + ' passed, ' +
.failed + ' failed, ' +
.pending + ' pending ' +
'(' + .time / 1000 + 's)'
)
empty_line: -> console.log ' '