Based on book Javascript Testing With Jasmine on Safari