flatiron/winston — pull request #319 by vvo (2013-10-22 17:14:27+00:00)
Title: fix .profile(..) .profile(.., {metadata}). Passing some metadata to profile.

Passing some metadata to .profile was not working properly.
The metadata was merged with the message because of
a wrong argument parsing:

Logger.prototype.log was called with (message, {..}, null) thus when
calling args.pop() you get "null" as meta.

We must pop() arguments untill they are not null.

- added test.
- I had to refactor the logger.profile tests because they were not called
synchronously.

As they are using the same logger instance, as they are using the
logger.once('logging') event, we must run them synchronously.

To run synchronous things in vows, well it's hacky, you must use sub-
contexts.