mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Move loadPackages to atom global. Handle '-tmbundle' in regex.
This simplifies the loading of TextMate bundles in the spec and benchmark helpers. Since `loadBundle` was already implemented on `atom`, it made sense to move this logic here. Config is now more focused on its core job of handling configuration, not loading bundles.
This commit is contained in:
@@ -19,20 +19,17 @@ requireStylesheet "jasmine.css"
|
||||
|
||||
require.paths.unshift(require.resolve('fixtures/packages'))
|
||||
|
||||
# Temporary solution to load textmate bundles for specs
|
||||
window.config = new Config()
|
||||
config.assignDefaults()
|
||||
config.loadPackages(config.getAvailableTextMateBundles())
|
||||
# Load TextMate bundles, which specs rely on (but not other packages)
|
||||
atom.loadPackages(atom.getAvailableTextMateBundles())
|
||||
|
||||
beforeEach ->
|
||||
window.fixturesProject = new Project(require.resolve('fixtures'))
|
||||
window.resetTimeouts()
|
||||
|
||||
# don't load or save user configuration
|
||||
# reset config after each spec; don't load or save from/to `config.json`
|
||||
window.config = new Config()
|
||||
spyOn(config, 'load')
|
||||
spyOn(config, 'save')
|
||||
config.assignDefaults()
|
||||
config.set "editor.fontSize", 16
|
||||
|
||||
# make editor display updates synchronous
|
||||
|
||||
Reference in New Issue
Block a user