test(B05): 115-5 시험 도구가 TIN 라이브러리(맨 이름 둘)를 config/node_modules 에서 풂 · 등록부 단언을 제안 ② 등록 뒤로(115-6)
- helper_115_5: delaunator · @kninnug/constrainautor 를 helper_115_6 과 같은 규칙으로 해석 - test_115_5 등록부: 등록 목록에 proposal2 · 제안 ② 고르면 제안 ② 로 그림 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EYJJRCfHfdCGNhmXTjQKV7
This commit is contained in:
@@ -9,6 +9,16 @@ const path = require("path");
|
||||
const ROOT = path.join(__dirname, "..", "..");
|
||||
const ts = require(path.join(ROOT, "config", "node_modules", "typescript"));
|
||||
const THREE = require(path.join(ROOT, "config", "node_modules", "three"));
|
||||
const NM = path.join(ROOT, "config", "node_modules");
|
||||
// 맨 이름 라이브러리(제안 ② TIN · 등록부가 끌어옴) — config/node_modules 에서 푼다(helper_115_6 과 같은 규칙).
|
||||
const LIBS = {
|
||||
// delaunator 는 ESM 전용 — Node 22 require(esm) 가 내주는 이름공간(default 포함).
|
||||
delaunator: require(path.join(NM, "delaunator", "index.js")),
|
||||
"@kninnug/constrainautor": {
|
||||
__esModule: true,
|
||||
default: require(path.join(NM, "@kninnug", "constrainautor", "lib", "Constrainautor.cjs")),
|
||||
},
|
||||
};
|
||||
|
||||
const cache = new Map();
|
||||
function loadTs(file) {
|
||||
@@ -21,6 +31,7 @@ function loadTs(file) {
|
||||
cache.set(full, box.exports);
|
||||
const localRequire = (request) => {
|
||||
if (request === "three") return THREE;
|
||||
if (LIBS[request]) return LIBS[request];
|
||||
// 화면 모듈(@ui · @config)은 코리도 계산이 부르지 않는다 — 빈 껍데기로 넘긴다.
|
||||
if (request.startsWith("@ui/") || request.startsWith("@config/")) {
|
||||
return new Proxy({}, { get: () => () => undefined });
|
||||
|
||||
@@ -70,12 +70,14 @@ def test_structure_top_hole_and_drape(results):
|
||||
def test_mode_registry_and_migration(results):
|
||||
r = results["modes"]
|
||||
assert r["slots"] == ["current:지금", "legacy-a:옛 A", "new1:새 ①", "proposal2:제안 ②"]
|
||||
assert r["registered"] == ["current", "legacy-a", "new1"] # 제안 ② 는 다른 창 몫(빈자리)
|
||||
assert r["registered"] == ["current", "legacy-a", "new1", "proposal2"] # 제안 ② 등록(115-6)
|
||||
assert r["defaultMode"] == "new1" and r["fresh"] == "new1"
|
||||
assert r["newHasTerrain"] is True
|
||||
assert r["oldDeformOff"] == "current" # 옛 「새 방식」 끔 → 지금
|
||||
assert r["oldLegacyOn"] == "legacy-a" # 옛 「옛 방식 A」 켬 → 옛 A
|
||||
assert r["proposal"] == "proposal2" and r["proposalDraws"] == "new1" # 미등록 → 기본으로 그림
|
||||
assert (
|
||||
r["proposal"] == "proposal2" and r["proposalDraws"] == "proposal2"
|
||||
) # 등록됨 → 제안 ② 로 그림
|
||||
assert r["set"] == "new1"
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user