Closed CurtisHumphrey closed 9 years ago
Can you add a failing test here?
Or even just describe something you were trying to do that was broken and I'll commit the test
I found it when I subscribing to a 'child add' event instead of a once 'value' event. When I pushed a new value later it did not update because handleRefEvent function expect change map to have keys added and removed and the function originally returned in and out. Do you still need a test or do you see it from inspection?
Would be helpful to see a test so I can be sure I'm fixing it
I'm working on one but at this point I have not be able to reproduce it outside of my code base. I could create a simple test to check that changeMap returns an object with keys "added" and "removed" if you want.
Ideally I'd like to see something that only calls the public API
By inspection you can see that "_.each(map.added, function (addKey) { self.fakeEvent('childadded', newSnap.child(addKey)); }); .each(map.removed, function (remKey) { self.fakeEvent('child_removed', oldSnap.child(remKey)); });" will never work without changeMap returning the correct object structure.
Got it. Post coming soon.
So it happen with some interplay of the startAt (not related to queries 2.0). Test uses only the public APIs.
Do you need anything else to incorporate this change?
Thanks for the reminder
Thanks!
Sure — thank you!
...cting to use added, removed