mirror of
https://github.com/Matysh/houseplan-card
synced 2026-09-29 03:09:36 +00:00
test: бамп версии не меняет отпечатки мутантов ядра; бандл пересобран
source-fingerprint.mjs входит в отпечаток сборки — три копии бандла обновлены вместе с тестом. Issue: #481 User-Visible: no
This commit is contained in:
@@ -406,3 +406,16 @@ test('#481: отпечатки реестра детерминированы и
|
||||
assert.notEqual(witnessFingerprint(MUTANTS[1]), first);
|
||||
assert.match(first, /^[0-9a-f]{64}$/);
|
||||
});
|
||||
|
||||
test('#481 AC6 (реестр): бамп версии продукта не меняет отпечаток ни одного мутанта, патчащего ядра', () => {
|
||||
const version = JSON.parse(readFileSync(join(repoRoot, 'package.json'), 'utf8')).version;
|
||||
const core = MUTANTS.filter((m) => m.patches.some((p) => /houseplan-(card|editor-runtime)\.ts$/.test(p.file)));
|
||||
assert.ok(core.length > 50, `ожидались десятки мутантов на ядра, найдено ${core.length}`);
|
||||
const bumped = (file) => readFileSync(join(repoRoot, file), 'utf8').split(version).join('9.9.9-bumped');
|
||||
const normalize = (text) => text.split('9.9.9-bumped').join('0.0.0-product-version').split(version).join('0.0.0-product-version');
|
||||
for (const m of core) {
|
||||
const before = witnessFingerprint(m, { root: repoRoot, normalize });
|
||||
const after = witnessFingerprint(m, { root: repoRoot, read: bumped, normalize });
|
||||
assert.equal(after, before, `${m.id}: релизный бамп изменил отпечаток`);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user