This commit is contained in:
Nathan Sobo
2015-10-17 10:52:39 -06:00
parent abee4c1db4
commit c35411cd29

View File

@@ -13,9 +13,11 @@ try
AtomEnvironment = require '../src/atom-environment'
ApplicationDelegate = require '../src/application-delegate'
{testRunnerPath, legacyTestRunnerPath, headless, logFile, testPaths} = getWindowLoadSettings()
# Show window synchronously so a focusout doesn't fire on input elements
# that are focused in the very first spec run.
remote.getCurrentWindow().show() unless getWindowLoadSettings().headless
remote.getCurrentWindow().show() unless headless
handleKeydown = (event) ->
# Reload: cmd-r / ctrl-r
@@ -39,15 +41,13 @@ try
document.title = "Spec Suite"
legacyTestRunner = require(getWindowLoadSettings().legacyTestRunnerPath)
testRunner = require(getWindowLoadSettings().testRunnerPath)
testRunner = require(testRunnerPath)
legacyTestRunner = require(legacyTestRunnerPath)
buildAtomEnvironment = (params) -> new AtomEnvironment(params)
buildDefaultApplicationDelegate = (params) -> new ApplicationDelegate()
promise = testRunner({
logFile: getWindowLoadSettings().logFile
headless: getWindowLoadSettings().headless
testPaths: getWindowLoadSettings().testPaths
buildAtomEnvironment: (params) -> new AtomEnvironment(params)
buildDefaultApplicationDelegate: (params) -> new ApplicationDelegate()
legacyTestRunner: legacyTestRunner
logFile, headless, testPaths, buildAtomEnvironment, buildDefaultApplicationDelegate, legacyTestRunner
})
promise.then(exitWithStatusCode) if getWindowLoadSettings().headless