Drug test

Ive seen post about women being nervous about drug screenings while pregnant. Is this mandatory and at what stage do you take it. I smoke marijuana and am very early about 3/4 weeks, if i stop now will it show on the test?