Update JS tests for new code