Does the node-red-test-helper support multiple outputs?

I've got the hang of writing unit tests in mocha using the test helper. It's great.
I'm trying to figure out to test an output on a second output of a node.
Is this supported by the test helper?

I can't think why it wouldn't be. What have you tried?

Here's a snippet of what I thought would be the way.

receiver.on("input", function (msg, msg2) {
          //msg is good. 
          //msg2 is undefined
          return done(err);

Hi @kareem613

Nodes only receive one message at a time. So if your sending node sends two messages, the receiving node will have its "input" event called twice - once for each message.

1 Like

depends what you mean by second output... if you mean a sequence then you have to count the incoming messages and check each in turn. If you mean a node has multiple output pins then you need to create/wire a helper to each.

1 Like

Ah that's it. I meant a second output. Wiring up a second node makes perfect sense.