     proxyquire '../lib/run.js',
       '@semantic-release/last-release-npm': lastRelease
       'fs': fs
-
-    # Check
-    expects = ->
+    .then ->
       expect(lastRelease.args[0][1]).to.deep.equal
         pkg: pkg
         npm:

chai.use require 'sinon-chai'
expect = chai.expect
sinon = require 'sinon'

proxyquire = require 'proxyquire'
mockFs = require 'mock-fs'


      done()

  it "throws an error if anything goes wrong", (done) ->
    # Setup
    pkg =
      name: "ModuleName"
    fs.writeFileSync './package.json', JSON.stringify pkg

    lastRelease.yields "Some Error"

    proxyquire '../lib/run.js',
      '@semantic-release/last-release-npm': lastRelease
      'fs': fs
    .then ->
      expect(process.exitCode).to.equal 1
      done()
