Know your dog first
Before any meeting, think about how your dog reacts to small, fast things. Do they chase squirrels, bunnies, or the neighbor's cat? Do they fixate and go stiff, or lunge at the end of the leash? A strong chase drive does not rule out a cat, but it means more work and more care. Breeds and individuals differ, and a dog's history matters, but a dog who has never lived with cats is not a safe bet to be left alone with one.
It also helps to know if your dog can be interrupted. Can you call their name and get a glance, even when something is exciting? If not, practice that first. A dog who can look at you and take a treat while a toy rolls past is better prepared than one who cannot.
Also think about the cat. A cat who has lived with dogs may be relaxed. A cat who has never met one may panic. An older or sick cat has fewer ways to cope. Their safety matters just as much as the dog's.
If you are adopting, ask the shelter or rescue whether the dog has been tested around cats, and ask what that actually looked like. A short test in a kennel hallway does not tell you how a dog will act in a living room at 2 a.m. Treat any report as a starting point, and plan your own slow introduction either way.