I have to unit test a component that sends 3 messages to a mock endpoint, but i only want to test the second message and ignore the others. How can i do this? i know, that there will be three messages. i dont care about the first and the third one…
Share
As indicated in the documentation, you can use
mock.message(1)to set assertions and perform tests on the second received message.