       uninstallCallback.callCount is 1
 
     runs ->
-      expect(uninstallCallback.argsForCall[0][0].message).toBe "Uninstalling \u201Cfoo\u201D failed."
-      expect(uninstallCallback.argsForCall[0][0].stderr).toContain 'ENOENT'
+      uninstallArg = uninstallCallback.argsForCall[0][0]
+      expect(uninstallArg.message).toBe "Uninstalling \u201Cfoo\u201D failed."
+      expect(uninstallArg.stderr).toContain noSuchCommandError
 
       packageManager.update {name: 'foo'}, '1.0.0', updateCallback
 

    packageManager = new PackageManager()

  it "handle errors spawning apm", ->
    waitsForPromise shouldReject: true, -> packageManager.search('test')
    waitsForPromise shouldReject: true, -> packageManager.getInstalled()
    waitsForPromise shouldReject: true, -> packageManager.getOutdated()

      updateCallback.callCount is 1

    runs ->
      updateArg = updateCallback.argsForCall[0][0]
      expect(updateArg.message).toBe "Updating to \u201Cfoo@1.0.0\u201D failed."
      expect(updateArg.packageInstallError).toBe true
      expect(updateArg.stderr).toContain noSuchCommandError

  describe "::isPackageInstalled()", ->
    it "returns false a package is not installed", ->
