Added fairly comprehensive jasmine tests