mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Don't filter errored nodes in result list
This commit is contained in:
parent
ea89aff3db
commit
c98b9dfaa3
@ -589,7 +589,11 @@ function loadNodeModule(node) {
|
||||
function loadNodeList(nodes) {
|
||||
var promises = [];
|
||||
nodes.forEach(function(node) {
|
||||
promises.push(loadNodeModule(node));
|
||||
if (!node.err) {
|
||||
promises.push(loadNodeModule(node));
|
||||
} else {
|
||||
promises.push(node);
|
||||
}
|
||||
});
|
||||
|
||||
return when.settle(promises).then(function(results) {
|
||||
|
@ -361,11 +361,14 @@ describe('NodeRegistry', function() {
|
||||
typeRegistry.load("wontexist",true).then(function(){
|
||||
var list = typeRegistry.getNodeList();
|
||||
list.should.be.an.Array.and.be.empty;
|
||||
typeRegistry.addNode(resourcesDir + "DoesNotExist/DoesNotExist.js").then(function(node) {
|
||||
done(new Error("ENOENT not thrown"));
|
||||
}).otherwise(function(e) {
|
||||
e.code.should.eql("ENOENT");
|
||||
typeRegistry.addNode(resourcesDir + "DoesNotExist/DoesNotExist.js").then(function(nodes) {
|
||||
nodes.should.be.an.Array.and.have.lengthOf(1);
|
||||
nodes[0].should.have.property("id");
|
||||
nodes[0].should.have.property("types",[]);
|
||||
nodes[0].should.have.property("err");
|
||||
done();
|
||||
}).otherwise(function(e) {
|
||||
done(e);
|
||||
});
|
||||
|
||||
}).catch(function(e) {
|
||||
|
Loading…
Reference in New Issue
Block a user