Fare Calculator with Javascript testing