exports.fakeAccounts = function (Account, callback) {
  async.map([{
    username: 'Jehoon',
    provider: 'farcebook'
  }, {
    username: 'C3P0',
    provider: 'farcebook'
  }], function (opts, cb) {
    Account.upsert(opts, cb);
  }, callback);
};
Works fine, but
exports.fakeAccounts = function (Account, callback) {
  async.map([{
    username: 'Jehoon',
    provider: 'farcebook'
  }, {
    username: 'C3P0',
    provider: 'farcebook'
  }], Account.upsert, callback);
};
throws an error, saying that Account is undefined.
I would have thought that since Account.upsert takes the same arguments it would work. I've solved it for now, but I'm wondering what I'm missing here.
 
     
    