The answer depends on many factors, such as how often you imbibe cannabis and when you last consumed it.
In urine tests, cannabis typically stays detectable for around 8 days after a single use or longer if you are a heavier user.
In saliva tests, cannabis typically stays detectable for around 24 hours after a single use or longer if you are a heavier user.
We often refer people to this helpful article, which lays out detectability guidelines for different types of tests, as well as for different use patterns.