added unit tests using mocha and sinon
0.0.6 fixes #4