Unit testing nodes #305
Replies: 4 comments
-
I'm somewhat curious what you're using the above workflow for. Is it just so tests fail quicker if an output value is incorrect? You could always add assertions within the node itself before you return, but that will incur unnecessary overhead. As you alluded to, you can add any intermediate node's output to the result of |
Beta Was this translation helpful? Give feedback.
-
ahh, sorry, should have explained better. so, I use the above to do unit testing of each node by updating each input as a separate step and also to try out different scenarios(not unit testing, strictly speaking).
basically, control the graph cycles, if you will, to check intermediate outputs. |
Beta Was this translation helpful? Give feedback.
-
Ok, thanks for more info. This is doable using
You could also avoid any modifications to N by just checking all outputs at the end of |
Beta Was this translation helpful? Give feedback.
-
ahh ok, I must be doing something wrong in my current tests then, I will give it another shot, thanks a lot mate. I will try again when I am home |
Beta Was this translation helpful? Give feedback.
-
I have been using this project and it's quite amazing!
Describe the solution you'd like
I would like to test out a combination of nodes. to do this, I need the ability to push individual messages to nodes and (sort of) invoke multiple cycles in the graph. for instance,
Describe alternatives you've considered
I have been looking at the unit tests. I can see you create out ts in the test and push it to the node/graph and check the output in the end. I am able to do the same, however, do you think I can test out using the above workflow pls
sorry, if I missed something.
ta!
Beta Was this translation helpful? Give feedback.
All reactions