Add test cases and fix code
Merge branch 'master' of https://github.com/KaranKamath/Pretend-Node-Package