Files
Pier_v1/tests/block-rebar-check.test.ts
T
ypshimandClaude Haiku 5.5 a6f362df56 feat(rebar): range checks for the block rebar settings (승인 2026-10-26)
- RB01 a setting outside its range (cover 50–100, side cover 50–100, first gap
  0–150, spacing S1/S2 100–200, leg 500–1000); RB02 S1 depth at or above the
  block height; RB03 the legs do not reach into the coping.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
2026-10-26 14:10:49 +09:00

23 lines
1005 B
TypeScript

import { describe, expect, it } from 'vitest';
import { buildPier } from '../src/core/geometry';
import { checkBlockRebar } from '../src/core/rebar/block-check';
import { loadP1 } from './helpers';
const codes = (input = loadP1(), extra = {}) => checkBlockRebar({ ...input, ...extra }, buildPier(input)).map((i) => i.code);
describe('받침블럭 철근 입력 범위 (승인 2026-10-26)', () => {
it('the P1 defaults are inside every range', () => {
expect(codes()).toEqual([]);
});
it('RB01: a setting outside its range (상면 피복 120, 간격 S2 300, 다리 1100)', () => {
expect(codes(loadP1(), { blockRebar: { coverTop: 120 } })).toContain('RB01');
expect(codes(loadP1(), { blockRebar: { spacingS2: 300 } })).toContain('RB01');
expect(codes(loadP1(), { blockRebar: { legLength: 1100 } })).toContain('RB01');
});
it('RB02: the S1 depth at or below the block height', () => {
expect(codes(loadP1(), { blockRebar: { coverTop: 150 } })).toContain('RB02');
});
});