Fix JS test causing navigation away from tests