Using Jasmine to test JavaScript