/
githubmirror
/
angular-cli
Обзор
Документация
Войти
/
githubmirror
/
angular-cli
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
tests/e2e/utils/test_process.ts
23 строки
597 B
Alan Agius
test: migrate legacy CLI tests to e2e directory
17 дек 2025, 19:36
17 дек 2025, 19:36
7d3e0ad
Код
Авторство
О чём код?
import { killAllProcesses } from './process'; const testScript: string = process.argv[2]; const testModule = require(testScript); const testFunction: () => Promise<void> | void = typeof testModule == 'function' ? testModule : typeof testModule.default == 'function' ? testModule.default : () => { throw new Error('Invalid test module.'); }; (async () => { try { await testFunction(); } catch (e) { console.error('Test Process error', e); process.exitCode = -1; } finally { killAllProcesses().finally(() => process.exit()); } })();