Sha256: 395cd6489e6f3c6ad41f2af07ca34ea31e0c699e83049769ae7f27bbd9bbd54d
Contents?: true
Size: 1.16 KB
Versions: 4
Compression:
Stored size: 1.16 KB
Contents
if !jasmine? throw new Error("jasmine not laoded!") class HeadlessReporterResult constructor: (name) -> @name = name @results = [] addResult: (message) -> @results.push(message) print: -> JHW.printName(@name) for result in @results do (result) => JHW.printResult(result) class jasmine.HeadlessReporter constructor: -> @results = [] @failedCount = 0 @length = 0 reportRunnerResults: (runner) -> for result in @results do (result) => result.print() JHW.finishSuite((new Date() - @startTime) / 1000.0, @length, @failedCount) reportRunnerStarting: (runner) -> @startTime = new Date() reportSpecResults: (spec) -> results = spec.results() @length++ if results.passed() JHW.specPassed() else JHW.specFailed() @failedCount++ failureResult = new HeadlessReporterResult(spec.getFullName()) for result in results.getItems() do (result) => if result.type == 'expect' and !result.passed_ failureResult.addResult(result.message) @results.push(failureResult) reportSpecStarting: (spec) -> reportSuiteResults: (suite) ->
Version data entries
4 entries across 4 versions & 1 rubygems