Emissions tests in the US are at the state level, not federal. For instance, the state of Virginia has emissions tests. However, the state of South Carolina does not require a test.
In Pennsylvania, emissions tests vary by county. Counties containing or near a major metropolitan area have them. It's likely the same in other states where emissions tests are required somewhere. Allegheny (Pittsburgh) and adjacent counties require it, but Greene (not adjacent, in the southwest corner of PA) does not.
Bland County, VA : 18 people/square mile
Fairfax County, VA : 2,761 people/square mile
Arlington County, VA : 8,309 people/square mile
Any surprise that emissions tests are required in Fairfax and Arlington, but not in Bland County? Largest city in Bland County has a population of 75; it is a different world from the DC suburbs.
And in California, which is often considered the strictest state ever invented by man, we have stringent emissions tests but no safety inspection at all! It really confuses all of the California-bashers when you tell them that.
There's a logic to it. A person who values their safety - most do! - has an incentive to deal with safety issues, regardless of whether they are compelled. Less so with emissions issues.
And it can vary within the states. Texas only requires emissions testing in the most populous counties (no point in testing cars in Brewster county with less than 1 person per square mile population density). In the counties with testing, new cars get a 2-year emissions exemption, after which they get tested yearly.
Testing is generally done via the OBD-II port, so the vehicle self-reports it's condition. Vehicles without OBD-II and "other" vehicles use a tailpipe probe to report on exhaust gases.