Night of Wishes, was written by German writer, Michael Ende. It was published around 1989. It is also known the Satanarchaeolidealcohellish Notion Potion (if based off the German title).
Yes, this is by the same writer that wrote The Neverending Story. Although The Neverending Story was filled with beauty, adventure, and tears, Night of Wishes is a rather different story. The quests are an adventure, but provided with more laughs.
The witch and wizard, known as Tyrannia and Beelzebub in the book, have two pieces of a scroll that provide the ingredients to brew a "wishing" potion. Because the they know their pets are spying on them, they brew the notion potion to grant wishes with the opposite effect. If they wish for clean air, the air would be polluted. If they wish for people to love each other, they might be hating each other.
Jacob the raven and Mauricio cat work against the clock to reserve the effects of the wishing potion made by their owners on New Year's Eve (with some connections to St. Sylvester's Day). Instead of chapters being sepereated by numbers, faces of clock appear when the events of the stories get closer to midnight.
Aside from the wizards being rather evil, they have to brew the potion to fulfil their end of a bargain with a "big bad". Their magical powers were not free and they need to cast a spell.
While the cartoon was kid friendly, the book is better recommended for slightly older kids (maybe tweens). The witch and wizard really get crazy wiht the potion, since drinking it had the same effect as alcohol.