mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-11-10 10:17:11 +03:00
Another attempt at preventing clipping
This commit is contained in:
parent
6736b6af3e
commit
40630114e7
@ -10,21 +10,23 @@ module.exports.runSpecSuite = (specSuite, logFile, logErrors=true) ->
|
||||
TimeReporter = require './time-reporter'
|
||||
timeReporter = new TimeReporter()
|
||||
|
||||
if logFile?
|
||||
logStream = fs.createWriteStream(logFile, flags: 'w')
|
||||
process.__defineGetter__ 'stdout', -> logStream
|
||||
process.__defineGetter__ 'stderr', -> logStream
|
||||
logStream = fs.openSync(logFile, 'w') if logFile?
|
||||
log = (args...) ->
|
||||
if logStream?
|
||||
fs.writeSync(args...)
|
||||
else
|
||||
process.stderr.write(args...)
|
||||
|
||||
if atom.getLoadSettings().exitWhenDone
|
||||
{jasmineNode} = require 'jasmine-node/lib/jasmine-node/reporter'
|
||||
reporter = new jasmineNode.TerminalReporter
|
||||
print: (args...) ->
|
||||
process.stderr.write(args...)
|
||||
log(args...)
|
||||
onComplete: (runner) ->
|
||||
process.stdout.write('\n')
|
||||
timeReporter.logLongestSuites 10, (line) -> process.stdout.write("#{line}\n")
|
||||
process.stdout.write('\n')
|
||||
timeReporter.logLongestSpecs 10, (line) -> process.stdout.write("#{line}\n")
|
||||
log('\n')
|
||||
timeReporter.logLongestSuites 10, (line) -> log("#{line}\n")
|
||||
log('\n')
|
||||
timeReporter.logLongestSpecs 10, (line) -> log("#{line}\n")
|
||||
atom.exit(runner.results().failedCount > 0 ? 1 : 0)
|
||||
else
|
||||
AtomReporter = require './atom-reporter'
|
||||
|
Loading…
Reference in New Issue
Block a user