Skip to content

Tests Inline

mchristegh edited this page Jul 14, 2026 · 1 revision

test-scripts/inline-harness.js — the first Node-RED-facing harness. A minimal RED stub (registerType/createNode, send/status/warn capture, close-with-done) instantiates the real node; outputs are asserted by port index.

Group Why it exists
I1 — construction The node registers itself in the command registry (the control node's lookup seam) with the right kind, shows its initial status, and deregisters on close.
I2 — sacred passthrough The core guarantee as a test: output 1 carries the same object reference, byte-identical, no properties added — while the message simultaneously lands encoded on the tape.
I3 — query routing A query via the registry lands the snapshot on the recorder's query output (and returns it to the caller) — results belong to the recorder's outputs regardless of who asked.
I4 — dump routing Incidents appear on the incidents output and as a tagged copy on the events output — the agreed dual-delivery pattern.
I5 — pause semantics The companion guarantee: pausing stops the tape but traffic keeps flowing on passthrough; drops are counted, redundant pauses produce ignored-acks, and the status shows the paused state and recovery.
I6 — watermark A matching message auto-dumps with trigger watermark, the condition and matched seq in the context, and the matching message already on the tape (capture-then-evaluate order).
I7 — watermark cooldown A second match inside the window is suppressed visibly (incidentSuppressed on events) while a manual dump still fires.
I8 — redaction config The multiline/comma config field parses into paths that actually mask — the editor-to-runtime plumbing for redaction.
I9 — hostile traffic A circular message both passes through by reference and lands safely encoded — the passthrough guarantee under attack.
I10 — persistence lifecycle Close-as-redeploy preserves the file and a reconstructed node restores from it with seq continuing; close-as-delete removes it. The C12 semantics proven through the real node lifecycle.
I11 — graceful degradation Persistence requested with no userDir warns once and records in memory — configuration problems degrade, never throw.
I12 — incident meta Incidents from the real node carry environment meta with a valid package version string, the process's node version, and a hostname.

Clone this wiki locally