Wrote tests for parser and stubbify

Learned a lot of Mocha. What do you think?