Fixed broken JS tests