From 39cb52c2241a83512e2122734cb5655ededee20a Mon Sep 17 00:00:00 2001 From: Katrina Uychaco Date: Wed, 27 Jan 2016 11:13:29 -0700 Subject: [PATCH] Fix tests for serialization --- spec/package-manager-spec.coffee | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/spec/package-manager-spec.coffee b/spec/package-manager-spec.coffee index 5a19a10aa..969215799 100644 --- a/spec/package-manager-spec.coffee +++ b/spec/package-manager-spec.coffee @@ -444,7 +444,7 @@ describe "PackageManager", -> runs -> expect(console.warn).not.toHaveBeenCalled() - fit "passes the activate method the package's previously serialized state if it exists", -> + it "passes the activate method the package's previously serialized state if it exists", -> pack = atom.packages.loadPackage("package-with-serialization") waitsForPromise -> pack.activate() # require main module @@ -819,14 +819,9 @@ describe "PackageManager", -> expect(atom.packages.isPackageActive("package-with-missing-provided-services")).toBe true expect(addErrorHandler.callCount).toBe 0 - describe "::serialize", -> - # TODO + describe "serialization", -> - describe "::serializePackage(pack)", -> - # afterEach -> - # atom.packages.unloadPackages() - - fit "does not serialize packages that have not been activated called on their main module", -> + it "does not serialize packages that have not been activated called on their main module", -> spyOn(console, 'warn') badPack = null waitsForPromise -> @@ -838,7 +833,7 @@ describe "PackageManager", -> atom.packages.serializePackage(badPack) expect(badPack.mainModule.serialize).not.toHaveBeenCalled() - fit "absorbs exceptions that are thrown by the package module's serialize method", -> + it "absorbs exceptions that are thrown by the package module's serialize method", -> spyOn(console, 'error') waitsForPromise -> @@ -848,7 +843,7 @@ describe "PackageManager", -> atom.packages.activatePackage('package-with-serialization') runs -> - atom.packages.deactivatePackages() + atom.packages.serialize() expect(atom.packages.packageStates['package-with-serialize-error']).toBeUndefined() expect(atom.packages.packageStates['package-with-serialization']).toEqual someNumber: 1 expect(console.error).toHaveBeenCalled()