Add unit tests

Some simple unit tests in jasmine just to show the idea.