Ectopic pregnancy

Hi I’m just wondering if I would get a positive test still if i was having an ectopic pregnancy? Thanks