Ariweb Suite 0.1.1 기반: 공통 라이브러리(db·http·세션·작업 엔진·할당/예약·알림·감사·보관소), 포털 뼈대, Webmaker/AriMail 도입 소스와 manifest
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
9ca4cee341
commit
c7aea8d419
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* test/run.mjs — 저장소의 모든 테스트(test/*.test.mjs) 를 순서대로 별도 프로세스로 실행하고 요약한다.
|
||||
* 외부 네트워크·실서버가 필요한 테스트는 ARIWEB_LIVE=1 일 때만 스스로 실행된다(각 파일이 판단).
|
||||
*/
|
||||
import { readdirSync } from 'node:fs';
|
||||
import { spawnSync } from 'node:child_process';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import { dirname, join } from 'node:path';
|
||||
|
||||
const dir = dirname(fileURLToPath(import.meta.url));
|
||||
const only = process.argv[2];
|
||||
const files = readdirSync(dir).filter((f) => f.endsWith('.test.mjs') && (!only || f.includes(only))).sort();
|
||||
let fail = 0;
|
||||
for (const f of files) {
|
||||
console.log(`\n▶ ${f}`);
|
||||
const r = spawnSync(process.execPath, ['--no-warnings', join(dir, f)], { stdio: 'inherit', env: { ...process.env, NODE_ENV: 'test' } });
|
||||
if (r.status !== 0) fail++;
|
||||
}
|
||||
console.log(`\n${fail ? '✘' : '✔'} 테스트 파일 ${files.length}개 중 실패 ${fail}개`);
|
||||
process.exit(fail ? 1 : 0);
|
||||
Reference in New Issue
Block a user