It depends on the jurisdiction and the specific circumstances of the sale. In some jurisdictions, there may be implied warranties or regulations that place responsibility on the seller to ensure that the vehicle can pass a smog test. However, in other jurisdictions, there may be no such obligations or warranties, and the responsibility may fall on the buyer to perform due diligence and verify the vehicle's ability to pass a smog test before purchasing it.
Specific laws will vary, so consulting the relevant consumer protection and motor vehicle regulations specific to your jurisdiction is crucial.