How long should I hold my pee?

I have to go to the bathroom, but I want to take a test. I’m 12dpo and it’s the afternoon, but I’m not sure how long I should hold it before testing.