In most states, including NY, the check is simply an ODBII test. This test simply asks the car for a list of components that need to work to meet emissions and a yes/no/maybe answer for if it's working. If all things work then the car must pass emissions. This is known to be true because the EPA requires that the manufacturer write up a report that proves they tested the emissions and it meets the standards when the emissions components are working and that the computer detects and reports when the emissions components don't work.
VW's problem is they lied on the report which and actual emissions are not tested for each car.