Files
Pier_v1/tests/member-fck.test.ts
T
CopilotandCopilot 06e1b97a62
ITAM Code Check / build-and-config-check (push) Failing after 37s
ITAM Docker Build Check / docker-build-check (push) Failing after 1m0s
교각 프로그램 초기 버전
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-02 15:55:01 +09:00

24 lines
870 B
TypeScript

import { describe, expect, it } from 'vitest';
import { fckChanged, IMPORTED_FCK } from '../src/core/rebar/common';
describe('IMPORTED_FCK (교각도 기준 부재별 기본 fck)', () => {
it('is 40 for 기둥·코핑 and 27 for 확대기초', () => {
expect(IMPORTED_FCK).toEqual({ column: 40, coping: 40, footing: 27 });
});
});
describe('fckChanged (기본과 다르면 주황색)', () => {
it('is false at the imported default', () => {
expect(fckChanged({ column: 40, coping: 40, footing: 27 }, 'coping')).toBe(false);
});
it('is true when the member differs from its imported default', () => {
expect(fckChanged({ coping: 42 }, 'coping')).toBe(true);
expect(fckChanged({ footing: 30 }, 'footing')).toBe(true);
});
it('is false when the member has no value yet', () => {
expect(fckChanged({}, 'column')).toBe(false);
});
});