Sorry if this is off topic, but this seemed to be the best site to ask.
I can think of several examples of the use of a narrative technique: a last-second change in mood, often occurring so close to the end of the work that the audience cannot respond to it, potentially forcing them to reinterpret what they've experienced up to that point.
A plot twist that doesn't change the mood of the story (such as the reveal in The Usual Suspects or the "Wait, the monster isn't dead!" cliche in horror) is not an example of this, nor is a plot twist necessary for this to occur (The absolute best example of this I've been able to find is in this short animation) though one can be a catalyst (for example in the 'true' ending to the game The Witch's House). It is distinct from Bathos, though if applied properly Bathos could be an example of this. It is perhaps the same as or at least a narrative equivalent of a similar technique in music, for example in the opening theme for the game The Legend of Zelda: Majora's Mask (which also uses it to a degree in the opening cinematic it plays over) or with the more commonly used Picardy Third.
My apologies for the lack of links- my reputation doesn't allow posting more than two. I'll edit this once I can, until then it shouldn't be too hard to find what I'm talking about using google.