diff --git a/scripts/test/run-e2e.mjs b/scripts/test/run-e2e.mjs index d202643..2a00bdc 100644 --- a/scripts/test/run-e2e.mjs +++ b/scripts/test/run-e2e.mjs @@ -52,6 +52,16 @@ try { console.error('[run-e2e] нет JSON-результатов: стенд не поднялся (см. e2e-run.txt)'); process.exit(1); } +const assertionCount = results.testResults?.reduce( + (total, file) => total + (file.assertionResults?.length ?? 0), + 0, +); +if (!assertionCount) { + console.error( + `[run-e2e] тесты не выполнены (vitest exit=${exitCode}): стенд не поднялся или global setup завершился ошибкой`, + ); + process.exit(1); +} const known = strict ? {} : JSON.parse(readFileSync(path.join(repoRoot, 'tests/e2e/known-defects.json'), 'utf8')).defects;