Improve JS tests