From bd82a6709ec3a7d3c3cf170c7420fb9ac7f75e33 Mon Sep 17 00:00:00 2001 From: Matysh Date: Fri, 28 Aug 2026 07:24:47 +0300 Subject: [PATCH] test: guard eager config canonicalization Issue: #337 User-Visible: no --- test/coordinate-canonicalization.test.mjs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/coordinate-canonicalization.test.mjs b/test/coordinate-canonicalization.test.mjs index 032fb04d..011ea60a 100644 --- a/test/coordinate-canonicalization.test.mjs +++ b/test/coordinate-canonicalization.test.mjs @@ -112,11 +112,20 @@ test('one position changes only x/y and preserves future metadata (#224)', () => test('frontend write paths adopt canonical candidates before persistence (#224)', () => { const source = readHouseplanProductionSource(); + const eagerCardSource = readFileSync( + new URL('../src/houseplan-card.ts', import.meta.url), + 'utf8', + ); assert.match(source, /enqueueSerializedWrite\(this\._writeChain, async \(\) =>/); assert.match( source, /const candidate = canonicalizeConfigGeometry\(this\._serverCfg\);/, ); + assert.match( + eagerCardSource, + /const candidate = canonicalizeConfigGeometry\(this\._serverCfg\);/, + 'the eager View writer keeps the same canonicalization barrier as the lazy editor writer', + ); assert.match( source, /const canonicalCandidate = canonicalizeConfigGeometry\(candidate\);[\s\S]*config: canonicalCandidate/,