Understanding JavaScript Testing