You cant and plus i cant tell you its illegal.
information about DUTY of vehicle inspection and documentation
it depends on what state your in. in most states they will not let it pass.
Not in Massachusetts
If its for emissions testing, in Oregon you go to the DEQ, if you want your car inspected for general maintenance and repairs, take it to your mechanic.
If NJ has an emissions standard, no. You'll have to repair whatever is wrong before the vehicle will pass emissions.
How to Prepare Your Car's Headlights For the MOT Vehicle Inspection
How to Prepare Your Car For the MOT Vehicle Inspection Under the Car
How to Prepare Your Car For the MOT Vehicle Inspection Under the Hood
How to Prepare Your Car For the MOT Vehicle Inspection Emissions Test