improve tests for nodeDir

Adds new resources (loose files, non NR pkgs, NR modules, NR Plugins)
Adds new tests
#getNodeFiles - new tests below
  √ Finds nodes and icons only in nodesDir with files, icons and valid node-red packages
  √ Should not find node-red node in nodesDir with files, icons and valid node-red packages
  √ Should not find node-red node in nodesDir when regular package and valid node-red packages
#getModuleFiles - new tests below
  √ gets a nodes module files
  √ Finds only 1 node-red node in nodesDir amongst legacy nodes and regular nodes
  √ Finds a node-red node in nodesDir with a sub dir containing valid node-red package
  √ Finds 2 node-red node and 1 plugin in nodesDir (in root of dir)
  √ Finds 2 node-red node and 1 plugin in nodesDir pointing to a node_modules dir
This commit is contained in:
Steve-Mcl
2022-06-16 11:00:31 +01:00
parent ba22b07dce
commit 98ebb02763
34 changed files with 441 additions and 49 deletions

View File

@@ -0,0 +1,3 @@
(function() {
console.log("Hi from test plugin client side")
})()

View File

@@ -0,0 +1,14 @@
module.exports = function (RED) {
RED.plugins.registerPlugin('test-theme', {
type: 'node-red-theme',
scripts: [
'files/clientside.js'
],
css: [
'files/theme.css',
],
monacoOptions: {
theme: "vs"
}
})
}

View File

@@ -0,0 +1 @@
:root{--red-ui-primary-background: #f2f3fb;}

View File

@@ -0,0 +1,24 @@
{
"name": "test-theme2",
"version": "0.0.1",
"description": "test theme for Node-RED",
"keywords": [
"node-red",
"plugin",
"theme"
],
"author": {
"name": "testy-McTesterson"
},
"license": "MIT",
"node-red": {
"version": ">=2.2.0",
"plugins": {
"test-theme2": "files/plugin.js"
}
},
"engines": {
"node": ">=12.x"
}
}