DNA test ?

Is there a way to do a dna test while pregnant? Besides getting an amniocentesis .. just curious 🤨