Using Jasmine to test code