Related: Some companies adopt ‘don’t ask, don’t tell’ stance on cannabis use

The best way to beat a marijuana test is simple: Don’t use drugs in the weeks leading up to a test. It’s also a good idea to delete any Facebook photos that proudly show off your smoke-blowing skills.

What does a test do? It looks for evidence of the psychoactive ingredient of cannabis, THC. The most common type of test — because it’s quick, simple and costs under $25 — is a urine test. You’ll be given a specially designed secure cup, usually with a temperature-gauging strip. It will get sealed with tamper-resistant tape, then sent via express delivery service to a testing laboratory.

If you use cannabis, this is what you need to know:

  • A urine test detects usage in the past 1 to 3 days in infrequent users — up to 30 days for habitual users.
  • A saliva test detects usage in the past 24 hours.
  • A hair test detects usage in the past three months.

Any pre-test advice? Southern California cannabis entrepreneur David Atkinson, who has advised weed-smoking musicians who hold day jobs, recommends drinking a lot of fluids to dilute any lingering THC — and not giving urine first thing in the morning, when THC is most concentrated.

It is possible to cheat on a test? It’s not possible to mask a positive urine sample by adding other substances. That has led some users to buy synthetic urine and then use a heating pad to increase the temperature of the urine to 98.6 degrees. “Detox kits” are also available on the internet that claim to help flush the body of THC.

If you’re unsure whether you’ll pass the test, you might want to first test yourself in the privacy of your home. Walgreens and CVS sell off-the-shelf “home drug tests,” ranging from $14 to $20. If you fail, ask to reschedule the test to a date you know you’ll be weed-free.