katowulf / mockfirebase

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

Avoid the "bad child path" exception after defining a child with leading slashes #23

Closed gajuro closed 10 years ago

gajuro commented 10 years ago

It took me a while to debug this.

I was using leading slashes as the firebase library supports them: firebase.child('/data/test'). Calling set on such instance lead to the "bad child path" exception.

katowulf commented 10 years ago

@gajuro Great stuff! Thanks for this. Could you please remove the browser/mockfirebase.js from the commit? That's a generated file and @bendrucker gets sad when you edit it.

bendrucker commented 10 years ago

@katowulf Lol, I rebased and merged in 404ba86. But thanks for looking out :smile:

bendrucker commented 10 years ago

Meaning @gajuro still gets credit for authoring 0ba975d495e7b7a99365848c35016796d63c216c

gajuro commented 10 years ago

I am a developer for over 10 years now.

Believe or not, I have to admit (not without shame) that this is my very first "real" contribution in an open source project. Thanks for understanding. I'm encouraged.

bendrucker commented 10 years ago

Woooooo

Congrats, and here's to many more! It's one of those super low-risk things to start doing. Worst case is that someone either requests you make changes or just checks out your branch and adds changes on top.

One thing to keep in mind for next time is that you usually want keep PR changes in a separate branch. That way, if you wanted to start a second PR, you can just do this:

git checkout master
git checkout -b fix-other-thing

Otherwise your PR can end up behind the upstream master and not be able to be auto-merged. Not an issue here, but with a project receiving more regular commits it might come up.

gajuro commented 10 years ago

Thanks, makes sense.

bendrucker commented 9 years ago

Released as v0.3.1 in 063fa49ecbd29327eac5da1e82d547fd54fc050c, sorry for the delay