Merge "Fix and clean up JS tests." into sc-dev