I'm using react-helmet and change the documents page title depending on some conditions.
How can I test that behaviour with react-testing-library?
I tried something like
const { debug } = render(<TitleChangingComponent title="Test" />, {
container: document.head,
});
debug();
But it just shows me an empty in the debug output. Additionally I'm not 100% sure if this is related to react-testing-library in general or jsdom (I'm using Jest for my tests).