getCandidates is tested in the browser