Fix broken JS tests