         return
       throw(err)
     .finally =>
-      done()
+      test_done()
+    .done()

  beforeEach (done) ->
    $.post(zc.TESTING_URL_MAP.flush, -> done())

  it 'should generate a new identity', (done) ->
    local_storage = new zc.MockLocalStorage()
    zc.create_app(
      urls: zc.TESTING_URL_MAP
      el: $('<div>')[0]
      local_storage: local_storage
    )
    .done (app) =>
      identity = JSON.parse(local_storage.getItem('identity'))
      expect(identity.fingerprint.length).toEqual(32)
      done()

  it 'should post identity to server', (done) ->
    identity_json = JSON.stringify(
      key: FIX.PRIVATE_KEY
      fingerprint: FIX.FINGERPRINT

      return zc.waitfor(-> identity.get('public_url'))
    .then (public_url) =>
      expect(public_url).toContain('/id/' + FIX.FINGERPRINT)
    .finally ->
      test_done()
    .done()

  it 'should send a message and receive it back', (test_done) ->
    identity_json = JSON.stringify(key: FIX.PRIVATE_KEY)

    $app = $('<div>')
