Preheat oven to 400 degrees and lightly spray or brush a mini doughnut pan with cooking oil.
In a large bowl, whisk together flour, sugar, cocoa powder, baking powder, and salt.
Add lightly beaten egg, milk, melted butter, and vanilla to flour mixture and stir until just combined, taking care not to over-mix.
Fill each cavity in the mini doughnut pan about ¾ of the way with batter. I like to put batter in a plastic bag, cut off the corner, and squeeze the batter into the doughnut pan (you can also use a pastry bag).
Bake donuts for 6-8 minutes, until they're light and springy to the touch. Let cool in the pan for a few minutes and then remove to cool completely on wire rack (you may need to run a knife around donut pan to loosen donuts). Repeat with remaining batter.
Once cooled, dip donuts upside down in chocolate icing. Set on wire rack with waxed or parchment paper set underneath and top with sprinkles if using.