Many pregnancy tests work by checking for the hormone hCG, and a test may pick up hCG until the ectopic pregnancy is fully treated.