From 6eabb01cf24b2df988b147d36071494867db7929 Mon Sep 17 00:00:00 2001 From: umsangdon Date: Sun, 18 Oct 2026 23:31:51 +0900 Subject: [PATCH] =?UTF-8?q?test(458=20=EB=8D=A7=202=20=EC=8B=9C=ED=97=98?= =?UTF-8?q?=20=ED=97=AC=ED=8D=BC):=20307=20=ED=97=AC=ED=8D=BC=20=EB=A1=9C?= =?UTF-8?q?=EB=8D=94=EA=B0=80=20.js=20=EB=81=9D=EC=9D=84=20=EA=B1=B7?= =?UTF-8?q?=EA=B3=A0=20.ts=20=EB=A1=9C=20=EC=B0=BE=EC=9D=8C=20=C2=B7=20tes?= =?UTF-8?q?t=5Fb06=5Fsave=5Frecompute=20=EC=9D=98=20saveDesign=20=EB=B3=B8?= =?UTF-8?q?=EB=AC=B8=20=EC=B0=BD=204000=20=EC=9E=90=EB=A1=9C=20=EB=84=93?= =?UTF-8?q?=ED=9E=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/tester/helper_307_pick_highlight.cjs | 3 ++- resources/tester/test_b06_save_recompute.py | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/resources/tester/helper_307_pick_highlight.cjs b/resources/tester/helper_307_pick_highlight.cjs index cf10fb03d..621fdafaf 100644 --- a/resources/tester/helper_307_pick_highlight.cjs +++ b/resources/tester/helper_307_pick_highlight.cjs @@ -17,7 +17,8 @@ const load = (file) => { const near = (m) => { if (m.startsWith("@config/")) return load(path.join(ROOT, "config", `${m.slice(8)}.ts`)); if (m.endsWith(".json")) return require(path.join(path.dirname(file), m)); - if (m.startsWith(".")) return load(path.join(path.dirname(file), `${m}.ts`)); + if (m.startsWith(".")) + return load(path.join(path.dirname(file), `${m.replace(/\.js$/, "")}.ts`)); return new Proxy({}, { get: () => () => {} }); }; new Function("exports", "module", "require", js)(box.exports, box, near); diff --git a/resources/tester/test_b06_save_recompute.py b/resources/tester/test_b06_save_recompute.py index a87c32222..63518f427 100644 --- a/resources/tester/test_b06_save_recompute.py +++ b/resources/tester/test_b06_save_recompute.py @@ -23,9 +23,9 @@ SHARED = ROOT / "A00_Common" / "design" / "design_shared.ts" SAVE = ROOT / "A00_Common" / "design" / "design_save.ts" -def _body(source: str, marker: str) -> str: +def _body(source: str, marker: str, size: int = 1200) -> str: start = source.index(marker) - return source[start : start + 1200] + return source[start : start + size] def test_저장이_면적을_모으기_전에_다시_계산한다() -> None: @@ -36,7 +36,7 @@ def test_저장이_면적을_모으기_전에_다시_계산한다() -> None: shared = _body(SHARED.read_text(encoding="utf-8"), "export async function saveSharedDesign") assert "prepare: crossSave?.prepare" in shared, "한 벌이 재계산을 저장 한 줄기에 안 넘긴다" save = SAVE.read_text(encoding="utf-8") - run = _body(save, "export async function saveDesign") + run = _body(save, "export async function saveDesign", 4000) assert run.index("ctx.prepare?.()") < run.index("ctx.cross(confirm)"), ( "저장 한 줄기가 재계산보다 면적 수집을 먼저 부른다 — 옛 면적이 실린다" )