As mentioned, different states have different types of inspections....and processes.
The CEL will normally cause you to fail an emissions inspection.
Here in Wisconsin, on OBDII vehicles (1996 and newer), they connect to the OBDII port.
If the CEL was recently cleared, you will fail as there will be a (I beleive) P1000 code stored in there.....which indicates that the vehicle has not had enough drive cycles to completely test the system.
If this is the case, they will fail you and tell you to come back in a few days, to give the OBDII system enough time to complete it's test cycle.
But, again, it depends on the local testing process.
Emission testing may be required in some parts of a state, and not in others.....it is mandated by the EPA for certain targeted areas.
As mentioned, it is a good idea to avoid waiting until the last minute....as if there are problems, you will have time to address them.