Heck, people will reinstall stock parts for inspection then swap back to the illegal parts. Common with emissions stuff as well.
Whether it’s done carefully or not, I doubt, though I did fail one year for headlight lenses too cloudy, requiring a fix and reinspection.
It's just not done though. There's a list of like 10 items to check, and you are only allowed to charge like $12-$18 for the check, so corners are cut, and your average 18 year old who was given the job of doing the inspection does not care, and enforcement is more concerned with the shops willing to give you a sticker for stuff that is outright criminal, like not really working brakes.
But yes, if there was a safety inspection, it should include verifying that lights function and that headlights are aimed appropriately. A brightness test might be too complex, but safety inspection would be the place to do it.
In EU most DMV equivalents check headlights yearly to catch illegal illumination envelopes (along with other safety-related aspects, brakes and whatnot).