In Colorado, the seller of a used car or truck is responsible for the emissions test required in the licensing to the new owner. If you buy a used car from a private party and the vehicle fails the emissions test, the seller is required by Department of Revenue rules to repair the car or truck to pass, or refund the purchase price. However, to enforce the rule, it may be necessary to sue the seller who does not want to comply and that is a big pain in the butt.
If you buy from a new or used car dealer, the same holds true when the dealer has not had the vehicle tested. Only, the dealer is allowed to provide you with a voucher to have the test run, with the same rule about failures as the private party.
My advice: have the vehicle emissions tested before you buy it and save some potential brain and financial damage.