mirror of
https://github.com/Matysh/houseplan-card
synced 2026-09-29 03:09:36 +00:00
test: a mutant for the only surviving wake-up of a replaced config body (#520)
With the bodies no longer declared as Lit properties, `onBodyReplaced` is the single path that turns a replaced config reference into an update — AC2 of this issue rests on it, and until now only a hand-run mutation stood behind that column. The mutant drops the notification from `setConfig`; the existing unit in `test/config-adoption.test.mjs` reddens on it. Verified: `node scripts/mutation-gate.mjs --id=adoption-notifies-no-host-on-config-replacement` — «поймано 1 из 1». Issue: #520 User-Visible: no
This commit is contained in:
@@ -7260,6 +7260,18 @@ const MUTANT_DEFINITIONS = [
|
||||
replace: " _serverCfg: { state: true },\n _devices: { state: true },",
|
||||
}],
|
||||
},
|
||||
{
|
||||
id: 'adoption-notifies-no-host-on-config-replacement',
|
||||
guard: 'node --test test/config-adoption.test.mjs',
|
||||
because: 'since #520 the bodies are no longer declared Lit properties, so this call is the '
|
||||
+ 'only thing that wakes an update when the config body is replaced: without it the '
|
||||
+ 'geometry epoch never moves and the plan keeps painting the retired body (#520 AC2)',
|
||||
patches: [{
|
||||
file: 'src/config-adoption.ts',
|
||||
find: " this.config = next;\n this.onBodyReplaced?.('_serverCfg', previous);",
|
||||
replace: ' this.config = next;',
|
||||
}],
|
||||
},
|
||||
{
|
||||
id: 'live-editor-view-mode-routes-live',
|
||||
guard: 'node --test test/live-editor.test.mjs',
|
||||
|
||||
Reference in New Issue
Block a user