test(559-1): CAD 시험 옛 실패 11 정리 — openwebcad npx vitest run 한 번에 tester/cad 시험까지

- 실패 11(259/270) = 코드 흠 0 · 시험 낡음 0 · 지움 0 — 모두 실행 설정 갈래
- 원인: resources/tester/cad 시험을 전용 설정(vitest.tmp.config.ts) 없이 openwebcad 기본 설정으로 돌림(--dir) → 시험 쪽 · src 쪽 flatten-js 가 다른 사본 → Illegal Parameters 10 · distanceTo()[0] undefined 1
- 덤 파일 다섯 로더 오류 = vitest 꼴 아닌 시험(node --experimental-strip-types 넷 통과 · ctrl-shortcut-sheet 는 vitest.ui.config.ts 로 2 통과)
- vitest.config.ts = workspace 셋(openwebcad · tester-cad · tester-cad-ui) — 설정 파일을 그대로 넣으면 root 가 덮여 시험을 못 찾아 extends + root 로 적음
- 결과: npx vitest run 408/408(136 + 270 + 2) · 옛 --dir 명령도 408/408

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-27 17:58:51 +09:00
co-authored by Claude Opus 5.5
parent 7b94288b6d
commit 043af8349c
+21 -5
View File
@@ -1,12 +1,28 @@
import { defineConfig } from 'vitest/config';
import { resolve } from 'node:path';
// `npx vitest run` 한 번 = openwebcad 시험 + resources/tester/cad 시험(각 설정으로)
export default defineConfig({
test: {
alias: {
'./src/drawControllers/screenCanvasController': resolve(
'./tests/mocks/drawControllers/screenCanvas.drawController.ts',
),
},
workspace: [
{
extends: true,
test: {
name: 'openwebcad',
alias: {
'./src/drawControllers/screenCanvasController': resolve(
'./tests/mocks/drawControllers/screenCanvas.drawController.ts',
),
},
},
},
// 설정 파일 그대로 넣으면 root 가 그 파일 폴더로 덮여 시험을 못 찾음 — root 를 적음
{ extends: './vitest.tmp.config.ts', root: '../..', test: { name: 'tester-cad' } },
{
extends: '../../resources/tester/cad/vitest.ui.config.ts',
root: '../..',
test: { name: 'tester-cad-ui' },
},
],
},
});