         expect(err).to.exist
         expect(err.code).to.equal('UploadPartFailed')
         expect(data).not.to.exist
+        done()
 
     if AWS.util.isNode()
       describe 'streaming', ->

        expect(data.Location).to.equal('FINAL_LOCATION')
        expect(reqs[1].params.ContentLength).to.equal(size)
        expect(reqs[2].params.ContentLength).to.equal(size)

    it 'supports zero-byte body buffers', ->
      reqs = helpers.mockResponses [data: ETag: 'ETAG']
      upload = new AWS.S3.ManagedUpload params: { Body: zerobody }
      upload.send ->
        expect(helpers.operationsForRequests(reqs)).to.eql ['s3.putObject']
        expect(err).not.to.exist

    it 'errors if partSize is smaller than minPartSize', ->
      expect(-> new AWS.S3.ManagedUpload(partSize: 5)).to.throw(
        'partSize must be greater than 10')

    it 'aborts if uploadPart fails', ->
      reqs = helpers.mockResponses [
        { data: UploadId: 'uploadId' }
        { data: ETag: 'ETAG1' }

        expect(err).to.exist
        expect(data).not.to.exist
        expect(reqs[3].params.UploadId).to.equal('uploadId')
        done()

    it 'aborts if complete call fails', (done) ->
      reqs = helpers.mockResponses [
        { data: UploadId: 'uploadId' }
        { data: ETag: 'ETAG1' }
