These comments are made for educational purposes only and do not constitute legal advice. No attorney-client relationship exists between us.
You may not be able to do anything if you bought the "as is." If you were given a warranty, then the dealer must fix the car enough to pass the emissions test. You could ask the dealer to exchange the car, but under the contract, he really doesn't have to do it.