Added jasmine tests for the existing code