In a large bowl, or the bowl of an electric stand mixer, whisk together the eggs and sugar until the mixture is thick and pale yellow. This step should take 1-2 minutes using an electric stand-mixer, or a bit longer if you are whisking by hand.
Add the flour, cocoa powder, salt and baking powder.
Mix until everything is thoroughly combined.
Next add the melted butter.
Continue whisking until you have a thick and smooth batter.
Leave the batter to rest in the fridge for at least 1 hour. If you plan to use a piping bag, I recommend transfering the batter to a piping bag now, and placing the piping bag into the fridge until needed.
Preheat the oven to 270°C (518°F).
Place a baking tray on the middle shelf.
Generously grease the madeleine mould with non-stick baking spray and a light dusting of cocoa powder. Place the mould over the kitchen sink and tap to remove any excess cocoa powder. I recommend doing this step even if you are using a non-stick mould.
Fill each madeleine mould until about 3/4 full, either with a spoon or with a piping bag filled with the batter.
Place the madeleine pan in the oven, and immediately turn down the temperature to 210°C (410°F).
Bake until the madeleine cakes have risen and are cooked through. For chocolate madeleines, they are generally cooked when the edges start to change colour. For most standard madeleine moulds, this should take about 7-10 minutes, depending on your oven. For a heart-shaped madeleine mould similar to that pictured, this should take about 10-12 minutes.
Remove the madeleine pan from the oven, and wait a few minutes before carefully removing the cakes from the moulds.
Leave the cakes to cool on a wire rack (ideally with the shell-side facing down so that the bumps are untouched).