katowulf/mockfirebase — pull request #1 by goldibex (2014-04-30 23:42:22+00:00)
Title: Transactions now work correctly -- saved `this` from mangling

The ```transaction``` method doesn't work as-is on MockFirebase because the scope of the callback to this._defer gets changed out from under the callback by the FlushQueue. This PR adds tests and fixes that.

The scope mangling happens [here](/katowulf/mockfirebase/blob/master/MockFirebase.js#L845-848):
```javascript
function process() {
// invoke each event
list.forEach(function(parts) {
parts[0].apply(null, parts.slice(1));
});
}
```