Adds tests and update package.json
Adds test for err