They don't test for smoking, they test for nicotine.
I think a blood test will find it if you've had it in the last 5 days; a mouth swab will go back for weeks.
Vaping e-juice with nicotine will equal smoking as far as they are concerned, as the test doesn't test for tobacco, but cotinine, a nicotine metabolite product. I just posted a thread asking about how to get on 0mg to pass tests at my work because no matter how much you say or prove you don't use tobacco, the test all comes down to nicotine, and that's the only tool in their toolbox. Patches, nicotine gum, vaping, snus, whatever... if it's got nic in it, and it gets in your body- They will classify you as a smoker. Period.