title: Why my integration test waits for async Promise in nodejs?
body: <p>I'm using <code>async.map</code> to merge fetch data from db using ids. Also, I save the result into redis for caching also, but it looks like my mocha test waits for the Promise to finish even I didn't call <code>then</code> because I thought it would just fire and forget. Am I missing something?</p>
  
  <p>Here's the code. </p>
  
  <pre><code>    queries.query(druidQuery)
      .then(addDetails)
      .catch(function catchFunc(err) {
        return reply(Boom.badImplementation(err, {message: err}));
      });
  
      function addDetails(response) {
        async.map(response, addDetailsList, function mapFunc(err, output) {
          return reply({
            data: output,
            query: options
          });
        });
      }
  
      function addDetailsList(items, cb) {
        async.map(items.result, addDetailsItem, cb);
      }
  
      function addDetailsItem(item, cb) {
        crawler.crawl(item).then(function(results) {
          crawler.set(item, JSON.stringify(results));
          var crawlOut = _.extend(item, results);
          return cb(null, crawlOut);
        }).catch(function() {
          return cb(null, item);
        });
      }
  </code></pre>
  
  <p>My test wouldn't exit as long as I have this line. </p>
  
  <p><code>crawler.set(item, JSON.stringify(results));</code></p>
  
  <p>And this is the code of that line.</p>
  
  <pre><code>var sh = require('shorthash');
  var bluebird = require('bluebird');
  var redis = require('redis');
  
  var config = require('../config');
  
  bluebird.promisifyAll(redis.RedisClient.prototype);
  bluebird.promisifyAll(redis.Multi.prototype);
  
      set: function set(url, contents) {
          var redisClient = redis.createClient({
            host: config.redis.url,
            port: config.redis.port
          });
  
          var urlHash = sh.unique(url);
          return redisClient.setAsync(urlHash, contents);
        },
  </code></pre>
  
  <p>If I take this line out <code>crawler.set(item, JSON.stringify(results));</code> my test would exit after it's finished. </p>
  
  <p>Update</p>
  
  <pre><code>describe('/', function postsDesc() {
      after(function after(done) {
        server.stop({timeout: 5000}, function err(errorResponse) {
          if(errorResponse) {
            throw errorResponse;
          }
          done();
        });
      });
  
      it('should get analytics posts with from date', function it(done) {
        var url = '/';
  
        server.inject(url, function injectResponse(response) {
          expect(response.statusCode).to.equal(200);
          done();
        });
      });
  }
  </code></pre>