From 92e1a27618d07530bb9dc18437bbe1fdf91a4708 Mon Sep 17 00:00:00 2001 From: Omarchybot <317366263+omarchybot@users.noreply.github.com> Date: Mon, 28 Sep 2026 15:48:23 +0200 Subject: [PATCH] Make the audio row test fail when a row is the node itself The fake nodes carried only id and name, so a projection that handed back the node passed every assertion. Giving one an object-valued audio property, as a live PwNode has, makes the deep comparison catch it. Co-Authored-By: Codex Medium Co-Authored-By: Claude Opus 5.5 --- test/shell.d/audio-test.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/shell.d/audio-test.sh b/test/shell.d/audio-test.sh index 8157f5fb..c0c962cb 100644 --- a/test/shell.d/audio-test.sh +++ b/test/shell.d/audio-test.sh @@ -14,9 +14,10 @@ assert(audio.isAudioSource({ audio: {} }), 'audio detects nodes with audio as so assert(audio.isAudioSource({ type: 'Audio/Source' }), 'audio detects typed source nodes') // A destroyed PwNode stays truthy but reads back no id, which is the shape the -// third entry stands in for: it must not reach a Repeater row. +// third entry stands in for: it must not reach a Repeater row. The first carries +// an object like a live node's audio, so a row that is the node itself fails here. assertDeepEqual( - audio.rowSnapshot([{ id: 0, name: 'alsa_output' }, { id: 42 }, {}, null]), + audio.rowSnapshot([{ id: 0, name: 'alsa_output', audio: { volume: 1 } }, { id: 42 }, {}, null]), [{ id: 0, name: 'alsa_output' }, { id: 42, name: '' }], 'audio projects nodes to primitive rows and drops nodes without an id' )