Skip to content

Commit

Permalink
test: amountToHangul 테스트 코드 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
kinndohyun committed Jun 25, 2024
1 parent f501224 commit 8f72144
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/amountToHangul.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ describe('amountToHangul', () => {
expect(amountToHangul('100000100')).toEqual('일억백');
});

it('80자를 넘을 수 없다.', () => {
const testFn = () =>
amountToHangul('123456789012345678901234567890123456789012345678901234567890123456789012345678901');
expect(testFn).toThrowError();
it('숫자로 된 금액이 80글자를 넘을 시 에러 발생', () => {
const longNumberString = '123456789012345678901234567890123456789012345678901234567890123456789012345678901';
expect(() => amountToHangul(longNumberString)).toThrowError(`convert range exceeded : ${longNumberString}`);
});
});

0 comments on commit 8f72144

Please sign in to comment.