Hi there,
I've had several nannies, two of whom have become pregnant; one after several years with us, and the second who told us she was pregnant within 3 months of starting (and being the replacement for nanny who left after having her baby).
Nanny 1 had become part of the family, was a lovely caring and reliable person, and I had kind of guessed she and her DP would be starting a family so it was no surprise and we were glad to have had her as long as we had. We still keep in touch with her and her (children) now.
Nanny 2 was a problem from almost the start; after a month or so, asking to change hours / job description, being unreliable, and then around 3 months in told us she was pregnant. I had given her informal warnings and was considering giving her notice prior to that (was trying make it work because DC had only just had a change from other nanny leaving) so that didn't help because of course I couldn't do that as she was pregnant and would seem like it was pregnancy related even though it wasn't.
So - clearly two different situations.
However as previous poster says; even though with Nanny 2 I was mighty pee'd off, there's no way I would ever be nasty / mean / visibly displeased about personal circumstances to any employee, especially not a pregnant one. For Nanny 1, I was genuinely delighted she was pg, but 'secretly' thinking 'damn, we're going to lose her', keep smiling. In case 2 I was falsely saying 'happy news' whilst thinking (other things!).
The best way to approach it, in my opinion as a nanny employer, is to ask for a word when the DC are out of ear, and to say something along the lines of "I have something to tell you. I'm sorry this is probably not going to be the news you were wanting to hear, and it's nothing something I had planned or expected when I took on this job, but I've recently found out I'm pregnant".
If you've had a good relationship with the family so far, no reason why they won't have a private gulp and then take it on the chin. It is possible for you to go back to work with your baby if they agree it, so that might be something to consider longer term.
Good luck :-) and congratulations x