write more jasmine tests to handle edge cases