Update unit-tests.js

Add unit testing as per @sandeepmistry's request, issue #5.