Republican senator Ted Cruz, Texas, won re-election against insurgent Democrat Beto O'Rourke and a very tight midterm race.