import { describe, expect, it } from 'vitest'; import { buildPier } from '../src/core/geometry'; import { blockRebarPlanSvg } from '../src/view/block-rebar-plan-svg'; import { loadP1 } from './helpers'; const count = (svg: string, re: RegExp) => (svg.match(re) ?? []).length; describe('받침블럭 배근 평면 (승인 2026-10-26)', () => { it('a separate pair: 8 S2 and 8 S1 lines per block, each with two leg dots', () => { const svg = blockRebarPlanSvg(buildPier(loadP1()), 0); expect(count(svg, /stroke="#0F5C66" stroke-width="8"/g)).toBe(16); expect(count(svg, /stroke="#B4531F" stroke-width="8"/g)).toBe(16); expect(count(svg, / { const svg = blockRebarPlanSvg(buildPier({ ...loadP1(), bearingLayout: '일체' }), 0); expect(count(svg, /stroke="#0F5C66" stroke-width="8"/g)).toBe(19); expect(count(svg, /stroke="#B4531F" stroke-width="8"/g)).toBe(8); expect(count(svg, / { const svg = blockRebarPlanSvg(buildPier(loadP1()), 0); expect(svg).toContain('>S2<'); expect(svg).toContain('>S1<'); }); });