import { API_BASE_URL } from './env'; describe('API 주소', () => { it('항상 슬래시로 끝난다', () => { expect(API_BASE_URL.endsWith('/')).toBe(true); }); it('경로가 있는 주소에 요청 경로를 붙여도 마지막 구간이 사라지지 않는다', () => { const joined = new URL('pet/1', 'https://api.example.com/v3/').href; expect(joined).toBe('https://api.example.com/v3/pet/1'); }); });