The car will need to pass a regular smog test (not Test Only) within 90 days of the transfer. This applies even if you give the buyer a Bill of Sale that says “Sold As Is”.
Some people think they have better protection by saying “Sold As Is, Where Is”. I don’t think either phrase changes the smog test obligation.
The seller is technically obligated to handle this. However, in practice, the buyer may not be aware of the exact legal requirements.
Frequently, the buyer will perform the smog test after he buys it. Then, you will only hear about it if the car does not pass the test and expensive repairs are required.
If the buyer wants recourse, he would file a small claims case and likely win a judgment.
Why 90 days? Because the smog test computers drop all records after 90 days.