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)"), ( "저장 한 줄기가 재계산보다 면적 수집을 먼저 부른다 — 옛 면적이 실린다" )