Electrical characterization of superconducting single-photon detectors