In a 2-quart saucepan with a wire whisk, mix the sugar, cornstarch, cocoa and salt until combined. Whisk in the milk until blended.
Heat the mixture to boiling over medium heat, stirring constantly. Add the chocolate, and cook 1 minute, stirring until the chocolate melts and the pudding thickens slightly.
Remove the saucepan from the heat and stir in the vanilla. Spoon the pudding into custard cups. Serve warm, or cover the surface of the pudding directly with plastic wrap and refrigerate.
Recipe courtesy of Drop 5 Lbs with Good Housekeeping