     # because only in production env sentry api would make http request
     process.env.NODE_ENV = 'production'
     
-  it 'setup sentry client from SENTRY_DSN correctly', (done) ->
+  it 'setup sentry client from SENTRY_DSN correctly', ->
     # mock sentry dsn with random uuid as public_key and secret_key
     dsn = 'https://c28500314a0f4cf28b6d658c3dd37ddb:a5d3fcd72b70494b877a1c2deba6ad74@app.getsentry.com/16088'
     

      .post("/api/#{sentry_settings.project_id}/store/", 'error')
      .reply(200, {"id": "534f9b1b491241b28ee8d6b571e1999d"}) # mock sentry response with a random uuid
             
    assert.doesNotThrow =>
      err = 
      @sentry.error new Error('Error message'), 'message', '/path/to/logger'
      scope.done()
    done()
    
  it 'send message correctly', (done) ->
    scope = nock('https://app.getsentry.com')
      .matchHeader('X-Sentry-Auth'
      , "Sentry sentry_version=4, sentry_key=#{sentry_settings.key}, sentry_secret=#{sentry_settings.secret}, sentry_client=sentry-node")

    assert.deepEqual ['production'], _sentry.enable_env
    assert.equal _sentry.enabled, true
    
  it 'setup sentry client from credentials correctly', ->
    assert.equal sentry_settings.key, @sentry.key
    assert.equal sentry_settings.secret, @sentry.secret
    assert.equal sentry_settings.project_id, @sentry.project_id
    assert.equal os.hostname(), @sentry.hostname
    assert.deepEqual ['production'], @sentry.enable_env
    assert.equal @sentry.enabled, true
    
  it 'setup sentry client settings from settings passed in correctly', ->
    _sentry = new Sentry { enable_env: ['production', 'staging'] }
    assert.deepEqual _sentry.enable_env, ['production', 'staging']
    
  it 'empty or missing DSN should disable the client', ->
    _sentry = new Sentry ""
    assert.equal _sentry.enabled, false
    assert.equal _sentry.disable_message, "You SENTRY_DSN is missing or empty. Sentry client is disabled."
