No hateful comments this does not pertain me

So me and a friend was discussing drug testing while pregnant. I believe they test at birth and in order to drug test during pregnancy they have to have consent but didn’t have to have consent when baby is born to test baby. She thinks you are drug tested all through pregnancy and after pregnancy. I’m not really sure though. I’m 28 weeks pregnant.