It depends on the baby. One friend of mine could drink 2 coffees, 3 teas and 3L of coke a day plus 1kg of chocolate and her baby slept all night. I had one tiny square of dairy milk and DS wouldn't sleep at all.

I still don't have much caffeine (including in chocolate and proper hot chocolate) but that's lifestyle now as DS only feeds in the morning these days.

So while caffeine may affect a baby, you're best off looking at how caffeine affects your baby and adjusting your diet accordingly.