I agree on telling her now just incase she has another failed attempt.
I had to tell a friend who had not long miscarried after IVF. For us we could understand each other as she knew what I had been through with my ex so although it was incredibly sad we could have been pregnant together, she was still happy for me.
Hopefully your friend can be too. She may, naturally, find it upsetting so be prepared to be sensitive to this. It is a shame you can't just tell her as you normally would and expect a great reaction but it is important to tell her.
Good luck. And congratulations!