Pass legacyTestRunner parameter

This commit is contained in:
Antonio Scandurra
2015-10-07 09:22:38 +02:00
committed by Nathan Sobo
parent 13301b551c
commit 52c43a71d3
2 changed files with 7 additions and 1 deletions

View File

@@ -512,11 +512,12 @@ class AtomApplication
process.stderr.write 'Error: Specify at least one test path\n\n'
process.exit(1)
legacyTestRunnerPath = @resolveLegacyTestRunnerPath()
testRunnerPath = @resolveTestRunnerPath(testPaths[0])
isSpec = true
devMode = true
safeMode ?= false
new AtomWindow({windowInitializationScript, resourcePath, headless, isSpec, devMode, testRunnerPath, testPaths, logFile, safeMode})
new AtomWindow({windowInitializationScript, resourcePath, headless, isSpec, devMode, testRunnerPath, legacyTestRunnerPath, testPaths, logFile, safeMode})
resolveTestRunnerPath: (testPath) ->
FindParentDir ?= require 'find-parent-dir'
@@ -531,6 +532,9 @@ class AtomApplication
process.stderr.write "Error: Could not resolve test runner path '#{packageMetadata.atomTestRunner}'"
process.exit(1)
@resolveLegacyTestRunnerPath()
resolveLegacyTestRunnerPath: ->
try
require.resolve(path.resolve(@devResourcePath, 'spec', 'jasmine-test-runner'))
catch error

View File

@@ -32,12 +32,14 @@ try
document.title = "Spec Suite"
legacyTestRunner = require(getWindowLoadSettings().legacyTestRunnerPath)
testRunner = require(getWindowLoadSettings().testRunnerPath)
testRunner({
logFile: getWindowLoadSettings().logFile
headless: getWindowLoadSettings().headless
testPaths: getWindowLoadSettings().testPaths
buildAtomEnvironment: -> new AtomEnvironment
legacyTestRunner: legacyTestRunner
})
catch error