mirror of
https://github.com/pbakaus/impeccable.git
synced 2026-09-15 23:56:29 +03:00
Share doctor boot finding policy
Centralize the shared boot artifact checks so doctor adds only its deep checks while preserving the existing finding order and CLI contracts. AI-assisted: prepared by Codex under maintainer pbakaus scheduled-refactor authorization.
This commit is contained in:
@@ -634,6 +634,26 @@ describe('doctor CLI', () => {
|
||||
assert.equal(report.ruleRegistryAvailable, true);
|
||||
});
|
||||
|
||||
it('keeps boot and deep findings in their established artifact order', () => {
|
||||
write('PRODUCT.md', '# Product\n\n## Register\n\nbrand\n\n## Users\nDesigners.\n');
|
||||
write('DESIGN.md', '---\nname: Example\n---\n\n# Design System: Example\n');
|
||||
write('.impeccable/design.json', JSON.stringify({ schemaVersion: 1 }));
|
||||
write('.impeccable/config.json', JSON.stringify({ unknownSetting: true }));
|
||||
|
||||
const res = run(['--json']);
|
||||
assert.equal(res.status, 0, res.stderr);
|
||||
assert.deepEqual(
|
||||
JSON.parse(res.stdout).findings.map((entry) => entry.id),
|
||||
[
|
||||
'product-deprecated-register',
|
||||
'product-schema-legacy',
|
||||
'design-sidecar-schema-outdated',
|
||||
'design-md-coverage',
|
||||
'config-unknown-keys',
|
||||
],
|
||||
);
|
||||
});
|
||||
|
||||
it('applies only the automatic migrations under --fix', () => {
|
||||
write('PRODUCT.md', CURRENT_PRODUCT.replace('<!-- impeccable:product-schema 1 -->\n\n', ''));
|
||||
write('DESIGN.json', JSON.stringify({ schemaVersion: 2 }));
|
||||
|
||||
Reference in New Issue
Block a user