Yes, chocolate contains caffeine but much less than coffee. For example, 20 g of chocolate contains 10 times less caffeine than a cup of coffee(1).
1. Hervé Robert (2015). Les vertus santé du chocolat. VRAI/FAUX sur cet aliment gourmand Edp Sciences