Socket
Socket
Sign inDemoInstall

node-red-node-test-helper

Package Overview
Dependencies
142
Maintainers
2
Versions
22
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.2.5 to 0.2.6

36

index.js

@@ -60,2 +60,7 @@ /**

}
// case 4: NR & NRNTH are git repos sat alongside each other
try {
const nrpkg = require("../node-red/package.json");
return "../node-red/packages/node_modules/node-red"
} catch(ignored) {}
}

@@ -126,2 +131,10 @@

this._events = RED.runtime.events;
this._nodeModules = {
'catch': require(path.join(prefix, '@node-red/nodes/core/common/25-catch.js')),
'status': require(path.join(prefix, '@node-red/nodes/core/common/25-status.js')),
'complete': require(path.join(prefix, '@node-red/nodes/core/common/24-complete.js'))
}
}

@@ -245,9 +258,20 @@ } catch (ignored) {

if (Array.isArray(testNode)) {
testNode.forEach(fn => {
let preloadedCoreModules = new Set();
testFlow.forEach(n => {
if (this._nodeModules.hasOwnProperty(n.type)) {
// Go find the 'real' core node module and load it...
this._nodeModules[n.type](red);
preloadedCoreModules.add(this._nodeModules[n.type]);
}
})
if (!Array.isArray(testNode)) {
testNode = [testNode];
}
testNode.forEach(fn => {
if (!preloadedCoreModules.has(fn)) {
fn(red);
});
} else {
testNode(red);
}
}
});
return redNodes.loadFlows()

@@ -254,0 +278,0 @@ .then(() => {

6

package.json
{
"name": "node-red-node-test-helper",
"version": "0.2.5",
"version": "0.2.6",
"description": "A test framework for Node-RED nodes",

@@ -19,6 +19,6 @@ "main": "index.js",

"read-pkg-up": "7.0.1",
"semver": "7.3.2",
"semver": "7.3.4",
"should": "^13.2.3",
"should-sinon": "0.0.6",
"sinon": "9.0.2",
"sinon": "9.2.4",
"stoppable": "1.1.0",

@@ -25,0 +25,0 @@ "supertest": "4.0.2"

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc