mirror of
https://github.com/Nikolay-Shirokov/cc-1c-skills.git
synced 2026-08-18 17:20:22 +03:00
fix(tests): verify-snapshots скипает недоступную внешнюю выгрузку, а не падает
runner.mjs при отсутствии external-пути возвращает SKIP, verify-snapshots писал ошибку. Путь к дампу ERP/БП машинозависим: на Mac mini корпуса нет, и два кейса role-validate краснели при полностью исправном навыке. README предупреждает ровно об этом: раннеры читают один DSL каждый своей реализацией. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
261ea8c96d
commit
da51d8ab7d
@@ -764,8 +764,13 @@ async function verifyCase(skillName, caseName, skillConfig, caseData, opts) {
|
|||||||
log(`fixture: ${fixtureName}`, true);
|
log(`fixture: ${fixtureName}`, true);
|
||||||
} else if (typeof caseData.setup === 'string' && caseData.setup.startsWith('external:')) {
|
} else if (typeof caseData.setup === 'string' && caseData.setup.startsWith('external:')) {
|
||||||
const extPath = resolve(REPO_ROOT, caseData.setup.slice('external:'.length));
|
const extPath = resolve(REPO_ROOT, caseData.setup.slice('external:'.length));
|
||||||
|
// Недоступная внешняя выгрузка — СКИП, как в runner.mjs (`ensureSetup`, ветка
|
||||||
|
// external). Путь к дампу ERP/БП машинозависим: на маке его нет, и падение
|
||||||
|
// здесь красило набор при полностью исправном навыке — расхождение двух
|
||||||
|
// раннеров по одному и тому же ключу DSL.
|
||||||
if (!existsSync(extPath)) {
|
if (!existsSync(extPath)) {
|
||||||
result.errors.push(`External setup path not found: ${extPath}`);
|
result.skipped = true;
|
||||||
|
result.skipReason = `внешняя выгрузка недоступна на этой машине: ${extPath}`;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
cpSync(extPath, workDir, { recursive: true });
|
cpSync(extPath, workDir, { recursive: true });
|
||||||
|
|||||||
Reference in New Issue
Block a user