Only require AtomReporter if actually being used

This commit is contained in:
Kevin Sawicki
2013-08-28 21:20:31 -07:00
parent 156e9f9b24
commit 3e626f28c4

View File

@@ -13,8 +13,6 @@ module.exports.runSpecSuite = (specSuite, logErrors=true) ->
nakedLoad 'jasmine'
require 'jasmine-focused'
AtomReporter = require 'atom-reporter'
$ = require 'jquery'
TimeReporter = require 'time-reporter'
@@ -26,6 +24,7 @@ module.exports.runSpecSuite = (specSuite, logErrors=true) ->
onComplete: (runner) ->
atom.exit(runner.results().failedCount > 0 ? 1 : 0)
else
AtomReporter = require 'atom-reporter'
reporter = new AtomReporter()
require specSuite