feat(abut): 접속슬래브 배근 입력 저장
- AbutRecord.rebar.slab (바꾼 값만), applySlabRebar, 프로젝트 파일 검증 Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
fa7d0032c3
commit
9ae6cf0945
4 files changed
+34
-1
No files matched your search
@@ -106,3 +106,21 @@ describe('교대 접속슬래브 배근 A1 (AD8, 교대접속슬래브철근.md
|
||||
expect(r3.pts.length).toBeGreaterThan(2); // 헌치 · 벽체 배면에서 꺾임
|
||||
});
|
||||
});
|
||||
|
||||
import { applySlabRebar } from '../src/core/abut/edit';
|
||||
import { checkStoredAbutments } from '../src/core/project';
|
||||
|
||||
describe('③ 접속슬래브 배근 입력 저장', () => {
|
||||
it('stores only the changed values; undefined links a group back; refuses bad values', () => {
|
||||
const a = applySlabRebar(rec, { sMain: 200, k8: 6 });
|
||||
expect(a.rebar?.slab).toEqual({ sMain: 200, k8: 6 });
|
||||
expect(applySlabRebar(a, { sMain: undefined }).rebar?.slab).toEqual({ k8: 6 });
|
||||
expect(() => applySlabRebar(rec, { k8: 1.5 })).toThrow('R8 배수');
|
||||
expect(() => applySlabRebar(rec, { cv: 0 })).toThrow();
|
||||
});
|
||||
|
||||
it('the project file keeps the 접속슬래브 input and refuses a non-number', () => {
|
||||
expect(() => checkStoredAbutments([applySlabRebar(rec, { c: 90 })])).not.toThrow();
|
||||
expect(() => checkStoredAbutments([{ ...rec, rebar: { slab: { c: 'x' } } as never }])).toThrow('접속슬래브 배근');
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user