JavaScript testing