From eca7f2cd6d98f4847a4e8442bd7242b71b770874 Mon Sep 17 00:00:00 2001 From: Evan Morikawa Date: Thu, 9 Feb 2017 15:17:58 -0500 Subject: [PATCH] fix(spec): fix package manager spec --- spec/package-manager-spec.coffee | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spec/package-manager-spec.coffee b/spec/package-manager-spec.coffee index 015ff69ae..c1eaa1c18 100644 --- a/spec/package-manager-spec.coffee +++ b/spec/package-manager-spec.coffee @@ -130,6 +130,7 @@ describe "PackageManager", -> expect(pack.mainModule).toBe indexModule it "assigns config schema, including defaults when package contains a schema", -> + spyOn(NylasEnv.config, "_logError") expect(NylasEnv.config.get('package-with-config-schema.numbers.one')).toBeUndefined() waitsForPromise -> @@ -140,6 +141,8 @@ describe "PackageManager", -> expect(NylasEnv.config.get('package-with-config-schema.numbers.two')).toBe 2 expect(NylasEnv.config.set('package-with-config-schema.numbers.one', 'nope')).toBe false + expect(NylasEnv.config._logError).toHaveBeenCalled() + expect(NylasEnv.config._logError.callCount).toBe(1) expect(NylasEnv.config.set('package-with-config-schema.numbers.one', '10')).toBe true expect(NylasEnv.config.get('package-with-config-schema.numbers.one')).toBe 10