Move the x axis all the way to the right.
Then home it.
When it starts moving, press the homing switch with your finger.
Does it stop?
If it doesn't, check wiring.
If it does, the wiring is good. Make sure the switch is being contacted by the carriage.