mirror of
https://github.com/Matysh/houseplan-card
synced 2026-09-29 03:09:36 +00:00
@@ -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/,
|
||||
|
||||
Reference in New Issue
Block a user