mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Merge branch 'master' of github.com:atom/atom
This commit is contained in:
@@ -39,7 +39,9 @@ specPackageName = null
|
||||
specPackagePath = null
|
||||
specProjectPath = null
|
||||
|
||||
if specDirectory = atom.getLoadSettings().specDirectory
|
||||
{specDirectory, resourcePath} = atom.getLoadSettings()
|
||||
|
||||
if specDirectory
|
||||
specPackagePath = path.resolve(specDirectory, '..')
|
||||
try
|
||||
specPackageName = fs.readObjectSync(path.join(specPackagePath, 'package.json'))?.name
|
||||
@@ -68,9 +70,7 @@ beforeEach ->
|
||||
spyOn(atom.menu, 'sendToBrowserProcess')
|
||||
|
||||
# reset config before each spec; don't load or save from/to `config.json`
|
||||
config = new Config
|
||||
resourcePath: window.resourcePath
|
||||
configDirPath: atom.getConfigDirPath()
|
||||
config = new Config({resourcePath, configDirPath: atom.getConfigDirPath()})
|
||||
spyOn(config, 'load')
|
||||
spyOn(config, 'save')
|
||||
config.setDefaults('core', RootView.configDefaults)
|
||||
|
||||
@@ -23,9 +23,10 @@ setSpecDirectory = (specDirectory) ->
|
||||
setSpecField('specDirectory', specDirectory)
|
||||
|
||||
runAllSpecs = ->
|
||||
{resourcePath} = atom.getLoadSettings()
|
||||
# Only run core specs when resource path is the Atom repository
|
||||
if Git.exists(window.resourcePath)
|
||||
requireSpecs(path.join(window.resourcePath, 'spec'))
|
||||
if Git.exists(resourcePath)
|
||||
requireSpecs(path.join(resourcePath, 'spec'))
|
||||
setSpecType('core')
|
||||
|
||||
fixturesPackagesPath = path.join(__dirname, 'fixtures', 'packages')
|
||||
@@ -34,7 +35,7 @@ runAllSpecs = ->
|
||||
packagePaths = _.groupBy packagePaths, (packagePath) ->
|
||||
if packagePath.indexOf("#{fixturesPackagesPath}#{path.sep}") is 0
|
||||
'fixtures'
|
||||
else if packagePath.indexOf("#{window.resourcePath}#{path.sep}") is 0
|
||||
else if packagePath.indexOf("#{resourcePath}#{path.sep}") is 0
|
||||
'bundled'
|
||||
else
|
||||
'user'
|
||||
|
||||
Reference in New Issue
Block a user