Closed msarauer closed 11 months ago
Is there a way to simulate onMessage being invoked in react-testing-library? I've tried:
const iframe = screen.getByTitle('iframe') as HTMLIFrameElement const TEST_MESSAGE = 'test-message' iframe.contentWindow?.postMessage(TEST_MESSAGE, window.location.origin)
but that doesn't seem to work.
Good question, I think that is more for Stack Overflow
Is there a way to simulate onMessage being invoked in react-testing-library? I've tried:
but that doesn't seem to work.