test: guard eager config canonicalization

Issue: #337
User-Visible: no
This commit is contained in:
Matysh
2026-08-28 05:40:28 +00:00
committed by claude[bot]
parent 9b519b0d4c
commit bd82a6709e
@@ -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/,