Detecting pot

How long in advance do you need to stop smoking before baby comes so they can’t detect it in the baby? I heard they can test the first poop and Blood. It only stays in Blood 90 days but what about poop? I’ve only smoked maybe 20 times, mostly in the last 2 weeks, I’m 25 weeks today. I have terrible pain and was going through a very rough time with depression too so I needed it lately. I stopped a few days ago but wondering if I can one or two more times without it being detected. Thanks!

I live in Ohio.