Fix JavaScript tests refs #5384