Fix JS tests. They will need further improvement