mirror of
https://github.com/atom/atom.git
synced 2026-01-24 14:28:14 -05:00
Pass legacyTestRunner parameter
This commit is contained in:
committed by
Nathan Sobo
parent
13301b551c
commit
52c43a71d3
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user