katowulf / mockfirebase

Firebase mock library for writing unit tests (experimental)
157 stars 40 forks source link

Validate event names #68

Closed Grety closed 9 years ago

Grety commented 9 years ago

When trying to subscribe (with .on() or .once()) on a MockFirebase object with a wrong event name get a misleading error Uncaught TypeError: Cannot read property 'push' of undefined

bendrucker commented 9 years ago

Just notes for me here, I'll fix this. Firebase logs:

Error: Query.on failed: First argument must be a valid event type: "value", "child_added", "child_removed", "child_changed", or "child_moved".