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/,