How long before test can tell if positive?

Jade4159
Hi I had a miscarriage 7 weeks ago at about 6 weeks I have pcos and recently been having a few symptoms took a. Test and it was negative does anyone know how many weeks u need to be before a test can tell if it's positive?