🔥 Remove uninstallAutocompletePlus and migrateSublimeTabsSettings

This commit is contained in:
Thomas Johansen
2015-09-05 15:22:54 +02:00
committed by Nathan Sobo
parent 38b8332c0b
commit b5c4f0c2ad
3 changed files with 0 additions and 101 deletions

View File

@@ -896,66 +896,3 @@ describe "PackageManager", ->
expect(atom.config.get('core.themes')).not.toContain packageName
expect(atom.config.get('core.themes')).not.toContain packageName
expect(atom.config.get('core.disabledPackages')).not.toContain packageName
describe "deleting non-bundled autocomplete packages", ->
[autocompleteCSSPath, autocompletePlusPath] = []
fs = require 'fs-plus'
path = require 'path'
beforeEach ->
fixturePath = path.resolve(__dirname, './fixtures/packages')
autocompleteCSSPath = path.join(fixturePath, 'autocomplete-css')
autocompletePlusPath = path.join(fixturePath, 'autocomplete-plus')
try
fs.mkdirSync(autocompleteCSSPath)
fs.writeFileSync(path.join(autocompleteCSSPath, 'package.json'), '{}')
fs.symlinkSync(path.join(fixturePath, 'package-with-main'), autocompletePlusPath, 'dir')
expect(fs.isDirectorySync(autocompleteCSSPath)).toBe true
expect(fs.isSymbolicLinkSync(autocompletePlusPath)).toBe true
jasmine.unspy(atom.packages, 'uninstallAutocompletePlus')
afterEach ->
try
fs.unlink autocompletePlusPath, ->
it "removes the packages", ->
atom.packages.loadPackages()
waitsFor ->
not fs.isDirectorySync(autocompleteCSSPath)
runs ->
expect(fs.isDirectorySync(autocompleteCSSPath)).toBe false
expect(fs.isSymbolicLinkSync(autocompletePlusPath)).toBe true
describe "when the deprecated sublime-tabs package is installed", ->
grim = require 'grim'
includeDeprecatedAPIs = null
beforeEach ->
{includeDeprecatedAPIs} = grim
grim.includeDeprecatedAPIs = false
afterEach ->
grim.includeDeprecatedAPIs = includeDeprecatedAPIs
it "enables the tree-view and tabs package", ->
atom.config.pushAtKeyPath('core.disabledPackages', 'tree-view')
atom.config.pushAtKeyPath('core.disabledPackages', 'tabs')
spyOn(atom.packages, 'getAvailablePackagePaths').andReturn [
path.join(__dirname, 'fixtures', 'packages', 'sublime-tabs')
path.resolve(__dirname, '..', 'node_modules', 'tree-view')
path.resolve(__dirname, '..', 'node_modules', 'tabs')
]
atom.packages.loadPackages()
waitsFor ->
not atom.packages.isPackageDisabled('tree-view') and not atom.packages.isPackageDisabled('tabs')
runs ->
expect(atom.packages.isPackageLoaded('tree-view')).toBe true
expect(atom.packages.isPackageLoaded('tabs')).toBe true

View File

@@ -156,8 +156,6 @@ beforeEach ->
spyOn(clipboard, 'writeText').andCallFake (text) -> clipboardContent = text
spyOn(clipboard, 'readText').andCallFake -> clipboardContent
spyOn(atom.packages, 'uninstallAutocompletePlus')
addCustomMatchers(this)
afterEach ->