It is absolutely wise to write on the bill of sale (BOS) that the buyer has agreed to be responsible for all repairs and the emission test. You should also make it clear on the BOS that this is an "as is" purchase; and there are no express or implied warranties being made by the seller.
Despite the above, there are two things that you need to remain aware of. First - you are not allowed to "hid" any known repair needs. For example, if you know that the radiator is leaking, you can't keep it a secret and hope that the buyer does not find out until after the sale. Hiding repair needs can potentially invalidate the agreement. (That doesn't mean that you have to find repair needs, you just can't hide what you know.) Second - there is an implied warranty built into all car purchases that says the car is being purchased for the purpose of driving. If a car cannot be registered for any reason (no inspection or no clear title), the sale is invalid. If the car is currently unable to pass the emission inspection, you must make that explicitly clear to the buyer before the sale. (I would even suggest writing that fact into the BOS - the buyer is aware that the car cannot currently pass inspection, and is 100% responsible for making all repairs necessary to make it passable.) If you do not have clear title to the car, you would have to fix that before you can sell the car at all.
Hope this helps.
~ Kem Eyo
The above answer is a general explanation of legal rights and procedures. It does not constitute legal advice. Nor does it establish an attorney-client relationship between the individual posting the question and the attorney providing the answer.