lawl-spec-reporter
Version:
Spec reporter for jasmine, based on jasmine-spec-reporter, outputs in LolSpeak
22 lines (20 loc) • 959 B
text/coffeescript
SpecReporter = require('../src/lawl-spec-reporter.js')
describe 'duration', ->
it 'should be human readable', ->
secs = 1000
mins = 60 * secs
hours = 60 * mins
reporter = new SpecReporter()
= reporter.metrics.formatDuration
expect().toBe '0 SECZ'
expect().toBe '0.01 SECZ'
expect().toBe '0.999 SECZ'
expect().toBe '1 SECZ'
expect().toBe '10 SECZ'
expect().toBe '59 SECZ'
expect().toBe '1 MINZ'
expect().toBe '1 MINZ 1 SECZ'
expect().toBe '59 MINZ'
expect().toBe '1 HRZ'
expect().toBe '3 HRZ 28 MINZ 53 SECZ'
expect().toBe '3 HRZ 53 SECZ'