Testing for COVID-19 infection is done via a nasopharyngeal swab polymerase chain reaction (PCR) test that looks for the SARS-CoV-2 virus.