Check where the batter takes longest
For a regular layer cake, the center is the useful place to check. If the recipe uses a tester, insert it there and read it with the other cues in the method. A dark chocolate batter makes color hard to judge, and an edge that looks ready can hide an unset center.
Use a different cue for a different cake
Follow the instructions for an airy cake such as Angel Food Cake, including how it cools. Chocolate Lava Cakes have a different goal: set edges and a soft center. Waiting for the middle of a lava cake to behave like a fully baked layer cake will take away the molten texture.
Further reading in King Arthur Baking’s cake doneness guide.