Added JavaScript collision detection test