Phase 3 (convenience form) of golden-parity redesign (epic #2264). Adds npm run gen:golden (regenerates both fixture sets) and points the golden-parity/tree failure messages at it. Full CI-auto-comment deferred (documented in ADR-2264). Closes #2268.
This commit is contained in:
@@ -90,7 +90,7 @@ for (const runtime of runtimes) {
|
||||
if (!fs.existsSync(fixturePath)) {
|
||||
assert.fail(
|
||||
`Golden fixture missing for runtime '${runtime}': ${fixturePath}\n` +
|
||||
'Run UPDATE_GOLDEN=1 node --test tests/golden-install-parity.test.cjs to capture.'
|
||||
'Run "npm run gen:golden" to generate the fixtures (or, for humans, UPDATE_GOLDEN=1 node --test tests/golden-install-parity.test.cjs).'
|
||||
);
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@ for (const runtime of runtimes) {
|
||||
if (added.length) lines.push(` added (${added.length}): ${added.join(', ')}`);
|
||||
if (removed.length) lines.push(` removed (${removed.length}): ${removed.join(', ')}`);
|
||||
if (changed.length) lines.push(` changed (${changed.length}): ${changed.join(', ')}`);
|
||||
lines.push('Run UPDATE_GOLDEN=1 to recapture if the change is intentional.');
|
||||
lines.push('If the change is intentional, run "npm run gen:golden" to regenerate the fixtures (works without node --test; humans may also use UPDATE_GOLDEN=1 node --test).');
|
||||
assert.deepEqual(actual, golden, lines.join('\n'));
|
||||
}
|
||||
});
|
||||
@@ -146,7 +146,7 @@ test('golden parity — claude (local legacy layout)', async (t) => {
|
||||
if (!fs.existsSync(fixturePath)) {
|
||||
assert.fail(
|
||||
`Golden fixture missing for claude-local: ${fixturePath}\n` +
|
||||
'Run UPDATE_GOLDEN=1 node --test tests/golden-install-parity.test.cjs to capture.',
|
||||
'Run "npm run gen:golden" to generate the fixtures (or, for humans, UPDATE_GOLDEN=1 node --test tests/golden-install-parity.test.cjs).',
|
||||
);
|
||||
}
|
||||
|
||||
@@ -159,7 +159,7 @@ test('golden parity — claude (local legacy layout)', async (t) => {
|
||||
if (added.length) lines.push(` added (${added.length}): ${added.join(', ')}`);
|
||||
if (removed.length) lines.push(` removed (${removed.length}): ${removed.join(', ')}`);
|
||||
if (changed.length) lines.push(` changed (${changed.length}): ${changed.join(', ')}`);
|
||||
lines.push('Run UPDATE_GOLDEN=1 to recapture if the change is intentional.');
|
||||
lines.push('If the change is intentional, run "npm run gen:golden" to regenerate the fixtures (works without node --test; humans may also use UPDATE_GOLDEN=1 node --test).');
|
||||
assert.deepEqual(actual, golden, lines.join('\n'));
|
||||
}
|
||||
});
|
||||
|
||||
@@ -86,7 +86,7 @@ for (const runtime of runtimes) {
|
||||
if (!fs.existsSync(fixturePath)) {
|
||||
assert.fail(
|
||||
`Install-tree fixture missing for runtime '${runtime}': ${fixturePath}\n` +
|
||||
'Run UPDATE_INSTALL_TREE=1 node --test tests/golden-install-tree.test.cjs to capture.'
|
||||
'Run "npm run gen:golden" to generate the fixtures (or, for humans, UPDATE_INSTALL_TREE=1 node --test tests/golden-install-tree.test.cjs).'
|
||||
);
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ for (const runtime of runtimes) {
|
||||
const lines = [`Install-tree mismatch for runtime '${runtime}':`];
|
||||
if (added.length) lines.push(` added (${added.length}): ${added.join(', ')}`);
|
||||
if (removed.length) lines.push(` removed (${removed.length}): ${removed.join(', ')}`);
|
||||
lines.push('Run UPDATE_INSTALL_TREE=1 to recapture if the change is intentional.');
|
||||
lines.push('If the change is intentional, run "npm run gen:golden" to regenerate the fixtures (works without node --test; humans may also use UPDATE_INSTALL_TREE=1 node --test).');
|
||||
assert.deepEqual(actual, fixture, lines.join('\n'));
|
||||
}
|
||||
});
|
||||
@@ -132,7 +132,7 @@ test('install tree — claude (local legacy layout)', async (t) => {
|
||||
if (!fs.existsSync(fixturePath)) {
|
||||
assert.fail(
|
||||
`Install-tree fixture missing for claude-local: ${fixturePath}\n` +
|
||||
'Run UPDATE_INSTALL_TREE=1 node --test tests/golden-install-tree.test.cjs to capture.',
|
||||
'Run "npm run gen:golden" to generate the fixtures (or, for humans, UPDATE_INSTALL_TREE=1 node --test tests/golden-install-tree.test.cjs).',
|
||||
);
|
||||
}
|
||||
|
||||
@@ -142,7 +142,7 @@ test('install tree — claude (local legacy layout)', async (t) => {
|
||||
const lines = ['Install-tree mismatch for claude-local:'];
|
||||
if (added.length) lines.push(` added (${added.length}): ${added.join(', ')}`);
|
||||
if (removed.length) lines.push(` removed (${removed.length}): ${removed.join(', ')}`);
|
||||
lines.push('Run UPDATE_INSTALL_TREE=1 to recapture if the change is intentional.');
|
||||
lines.push('If the change is intentional, run "npm run gen:golden" to regenerate the fixtures (works without node --test; humans may also use UPDATE_INSTALL_TREE=1 node --test).');
|
||||
assert.deepEqual(actual, fixture, lines.join('\n'));
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user