Even when angry, Hermione doesn’t use any violent or painful spells, and she indeed doesn’t pass Defence. Even with a troll coming after her, she doesn’t try to kill it.
She does.
Cool blue fires clung to the floor in small masses, surrounding a blazing pool that seemed to burn with a deadlier, hotter blue.
In one narrow circle the marble tiles were scorched and shattered by some explosive spell that only the most prodigious of first-year witches could have cast, with the last of her strength.
She does.
Point taken. (The quote is from the start of Chapter 89, in case anyone was wondering.)