added Jasmine JS unit tests