diff --git a/A00_Common/b_page_state.ts b/A00_Common/b_page_state.ts index ae1575192..b5b583ffc 100644 --- a/A00_Common/b_page_state.ts +++ b/A00_Common/b_page_state.ts @@ -21,8 +21,6 @@ * 않는다** — ②·④는 두 화면이 같은 키를 쓴다. * ========================================================================== */ -import { t } from "@ui/ui_template_locale"; - /** 값이 속한 통. `pref`·`draft`·`result` 셋만 저장소를 쓴다(즉시 반영은 표에 없다). */ export type StateBucket = "pref" | "draft" | "result"; @@ -457,8 +455,9 @@ function setOrMakeRoom(store: Storage, key: string, value: string): void { try { store.setItem(key, value); } catch (error) { - void import("@ui/ui_template_elements").then(({ showToast }) => - showToast(t("Session_Storage_Full"), "warning", 8000), + // 화면 모듈은 안에서만 — 이 파일을 Node 로 돌리는 시험 · 묶음이 안 끌게 + void Promise.all([import("@ui/ui_template_elements"), import("@ui/ui_template_locale")]).then( + ([{ showToast }, { t }]) => showToast(t("Session_Storage_Full"), "warning", 8000), ); throw error; } diff --git a/resources/tester/helper_384_s_session.cjs b/resources/tester/helper_384_s_session.cjs index 3ac1a5d05..e16d6c389 100644 --- a/resources/tester/helper_384_s_session.cjs +++ b/resources/tester/helper_384_s_session.cjs @@ -45,11 +45,10 @@ function fakeStorage(limit = Infinity) { global.window = { sessionStorage: fakeStorage(), localStorage: fakeStorage() }; const toasts = []; -const pageState = load("A00_Common/b_page_state.ts", (id) => - id.includes("ui_template_locale") - ? { t: (key) => key } - : { showToast: (msg, kind) => toasts.push([msg, kind]) }, -); +const pageState = load("A00_Common/b_page_state.ts", () => ({ + t: (key) => key, + showToast: (msg, kind) => toasts.push([msg, kind]), +})); const purged = []; const config = { CURRENT_PROJECT_ID_KEY: "frd_current_project_id" }; const sw = load("A00_Common/b_project_switch.ts", (id) => {