The CDC recommends that all women who are pregnant get tested for HIV. However, it adds that pregnant women have the option to opt out of getting this test if desired.
If you are pregnant, talk to your healthcare provider about the benefits of HIV testing during pregnancy.