>;
for (const person of ["person_a", "person_b"]) {
const local = structures[person] ?? {};
const d9 = local.d9 as { ascendant?: unknown } | undefined;
for (const [key, value] of [
["seventh_lord", local.seventh_lord],
["darakaraka", local.darakaraka],
["upapada", local.upapada],
["A7", local.A7],
["d9", d9?.ascendant],
] as const) {
assert.equal(typeof value, "string", `${person} ${key}`);
assert.ok(String(value).length > 0, `${person} ${key}`);
}
}
for (const line of blocks[1]?.lines ?? []) {
assert.equal(/7宫主 未标明|DK 未标明|UL 未标明|A7 未标明|D9 未标明/.test(line), false, line);
}
rmSync(output, { force: true });
});
test("the synastry report scrolls in a full-width outer container", () => {
const css = readFileSync(new URL("../src/app/globals.css", import.meta.url), "utf8");
const page = readFileSync(new URL("../src/components/personal-report/personal-report-page.tsx", import.meta.url), "utf8");
const scroll = css.slice(css.indexOf(".synastry-report-scroll {"), css.indexOf(".synastry-report {"));
const column = css.slice(css.indexOf(".synastry-report {"), css.indexOf(".synastry-report-back"));
assert.match(scroll, /width:\s*100%/);
assert.match(scroll, /height:\s*100%/);
assert.match(scroll, /overflow-y:\s*auto/);
assert.match(scroll, /overflow-x:\s*hidden/);
assert.match(column, /width:\s*min\(720px, 100%\)/);
assert.match(column, /margin-inline:\s*auto/);
assert.doesNotMatch(column, /height:\s*100%/);
assert.doesNotMatch(column, /overflow:\s*auto/);
assert.match(page, /\s* css.indexOf("@media print"));
assert.match(css.slice(printAt, printAt + 180), /overflow: visible !important/);
});