In the 1960s, many women who took a tranquilizer called thalidomide early in pregnancy gave birth to babies with phocomelia. So how are vaccines any different now since they haven't been tested on pregnant women?

No testing ????????? You assume so much in your statement. Vaccines are one of the most monitored agents in the US over the past 3 decades. Each lot/dose are recorded in detail from creation to administration. An adverse events, from a bad reaction to a fetal abnormality would be reported to a central registry.Live vaccines are discouraged, but outcomes have shown no adverse effects. Dead vaccines are safe & effective.
Drugs in pregnancy. A drug is different than a vaccine. A drug acts on receptors to cause an effect. A vaccine is an antigen or a altered virus which is designed to cause the immune system to make antibodies and protect the body from disease. Testing of drugs and vaccines has changed greatly from the fifties when thalidomide was originally tested. Vaccines are known to be safe for pregnant women even with no testing.
NOT relevant. Tholidimide was a sedative that had the toxic effect on the feats since then almost all non essential medications are avoided in the first 3 months of pregnancy vaccines are preventative measures and if recommended by your gynecologist in pregnancy should be safe.