mirror of
https://github.com/atom/atom.git
synced 2026-01-23 13:58:08 -05:00
add spec to check missing service methods are skipped
Signed-off-by: Kevin Sawicki <kevin@github.com>
This commit is contained in:
committed by
Kevin Sawicki
parent
a787242e7a
commit
2c46748307
@@ -547,6 +547,21 @@ describe "PackageManager", ->
|
||||
expect(consumerModule.consumeFirstServiceV4).not.toHaveBeenCalled()
|
||||
expect(consumerModule.consumeSecondService).not.toHaveBeenCalled()
|
||||
|
||||
it "ignores provided and consumed services that do not exist", ->
|
||||
addErrorHandler = jasmine.createSpy()
|
||||
atom.notifications.onDidAddNotification(addErrorHandler)
|
||||
|
||||
waitsForPromise ->
|
||||
atom.packages.activatePackage("package-with-missing-consumed-services")
|
||||
|
||||
waitsForPromise ->
|
||||
atom.packages.activatePackage("package-with-missing-provided-services")
|
||||
|
||||
runs ->
|
||||
expect(atom.packages.isPackageActive("package-with-missing-consumed-services")).toBe true
|
||||
expect(atom.packages.isPackageActive("package-with-missing-provided-services")).toBe true
|
||||
expect(addErrorHandler.callCount).toBe 0
|
||||
|
||||
describe "::deactivatePackage(id)", ->
|
||||
afterEach ->
|
||||
atom.packages.unloadPackages()
|
||||
|
||||
Reference in New Issue
Block a user