before functional changes by codex

This commit is contained in:
znetsixe
2026-02-19 17:37:42 +01:00
parent 7c8722b324
commit 2b9ad5fd19
30 changed files with 906 additions and 1 deletions

View File

@@ -0,0 +1,28 @@
const test = require('node:test');
const assert = require('node:assert/strict');
const NodeClass = require('../../src/nodeClass');
const { makeNodeStub, makeREDStub } = require('../helpers/factories');
test('registerChild with unknown node id currently throws (known robustness gap)', () => {
const inst = Object.create(NodeClass.prototype);
const node = makeNodeStub();
inst.node = node;
inst.RED = makeREDStub();
inst.source = {
childRegistrationUtils: {
registerChild() {},
},
};
inst._attachInputHandler();
assert.throws(() => {
node._handlers.input(
{ topic: 'registerChild', payload: 'missing-child', positionVsParent: 'upstream' },
() => {},
() => {},
);
});
});