fix(e2e): fail when database setup runs no tests
This commit is contained in:
parent
0910afd54d
commit
14d200851b
1 changed files with 10 additions and 0 deletions
|
|
@ -52,6 +52,16 @@ try {
|
||||||
console.error('[run-e2e] нет JSON-результатов: стенд не поднялся (см. e2e-run.txt)');
|
console.error('[run-e2e] нет JSON-результатов: стенд не поднялся (см. e2e-run.txt)');
|
||||||
process.exit(1);
|
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
|
const known = strict
|
||||||
? {}
|
? {}
|
||||||
: JSON.parse(readFileSync(path.join(repoRoot, 'tests/e2e/known-defects.json'), 'utf8')).defects;
|
: JSON.parse(readFileSync(path.join(repoRoot, 'tests/e2e/known-defects.json'), 'utf8')).defects;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue