Miscarriage question

I've had a miscarriage at 5 weeks and just wondered how long it would be before I got a negative pregnancy test. I'm over 6 weeks in and it's very much positive. This test was last thing at night...