What age can you get your child’s vision tested?

Everyone in my husband’s family wears glasses so I want to get my LO’s vision tested as soon as we’re able.

They did the basic eye test (shining a light) when he was a baby, but when can their actual vision be tested?

What age did your LO’s start wearing glasses if they needed them?