 
     describe "when the package is deprecated", ->
       it "returns null", ->
+        spyOn(console, 'warn')
         expect(atom.packages.loadPackage(path.join(__dirname, 'fixtures', 'packages', 'wordcount'))).toBeNull()
         expect(atom.packages.isDeprecatedPackage('wordcount', '2.1.9')).toBe true
         expect(atom.packages.isDeprecatedPackage('wordcount', '2.2.0')).toBe true

      expect(addErrorHandler.argsForCall[1][0].options.packageName).toEqual "package-with-invalid-styles"

    it "returns null if the package has an invalid package.json", ->
      addErrorHandler = jasmine.createSpy()
      atom.notifications.onDidAddNotification(addErrorHandler)
      expect(atom.packages.loadPackage("package-with-broken-package-json")).toBeNull()

      jasmine.restoreDeprecationsSnapshot()

    it "sets hasActivatedInitialPackages", ->
      spyOn(atom.styles, 'getUserStyleSheetPath').andReturn(null)
      spyOn(atom.packages, 'activatePackages')
      expect(atom.packages.hasActivatedInitialPackages()).toBe false
      waitsForPromise -> atom.packages.activate()
