node-red / node-red-node-test-helper

A test framework for Node-RED nodes
Apache License 2.0
57 stars 41 forks source link

RED.require() function not supported in node-red-node-test-helper #30

Open Landry25 opened 5 years ago

Landry25 commented 5 years ago

Dear all, I'm trying to load a node based on new node-red dashboard api addWidget but i have an error when loading TypeError: RED.require is not a function in my node I have the following code : ui = RED.require("node-red-dashboard")(RED); seems that require is not available in the object RED but I use the version 0.19.5 which is working outside of the test env.

Thank you for your help.

SergiuToporjinschi commented 3 years ago

yes you cannot test that, I cannot imagine a scenario to use this. only isolated nodes. Or very very simple and dummy nodes. I also tried a lot of things but it seems that RED instance is not loading any additional nodes.