23 lines
1005 B
TypeScript
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');
|
|
});
|
|
});
|