Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[문자열 덧셈 계산기] 이나영 미션 제출합니다. #572

Open
wants to merge 36 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
6f0da34
docs: README 문구 추가
Bewheneverwhatiwant Oct 17, 2024
f2f9c42
docs: REACME 내용 보완 - branch 전략 추가
Bewheneverwhatiwant Oct 17, 2024
d2b9264
docs: README 브랜치 전략 수정
Bewheneverwhatiwant Oct 18, 2024
fe7259c
feat: 빈 문자열 입력 시 0 반환 기능 추가
Bewheneverwhatiwant Oct 20, 2024
249df5a
docs: README 내용 추가 - 이슈 자동닫힘->수동닫음으로 전략 변경
Bewheneverwhatiwant Oct 20, 2024
316cc8f
feat: 쉼표구분자 문자열 입력 시 연산 기능 추가
Bewheneverwhatiwant Oct 20, 2024
e1020e0
docs: README 일부 내용 삭제
Bewheneverwhatiwant Oct 20, 2024
7dabd65
docs: README 개행 수정
Bewheneverwhatiwant Oct 20, 2024
7abe52f
feat: 쉼표 또는 콜론 구분자의 문자열 입력 시 연산 기능 추가
Bewheneverwhatiwant Oct 20, 2024
4ed98a0
feat: 커스텀 구분자 지원 기능 추가
Bewheneverwhatiwant Oct 20, 2024
f526e61
feat: 음수, 숫자가 아닌 값, 잘못된입력 처리 기능 추가
Bewheneverwhatiwant Oct 20, 2024
c2100f7
docs: README에 사용자 입력 겨우의 수 내용 추가
Bewheneverwhatiwant Oct 20, 2024
a36fc48
docs: README 개행 분리
Bewheneverwhatiwant Oct 20, 2024
614215e
refactor: run() 내부 try catch로 수정, 컨벤션에 따른 수정
Bewheneverwhatiwant Oct 20, 2024
08968bb
feat: 커스텀 구분자와 기본 구분자를 혼용해도 연산 가능하도록 기능 추가
Bewheneverwhatiwant Oct 20, 2024
3b9b3f9
docs: README 기능 및 사용자 경우의 수 추가
Bewheneverwhatiwant Oct 20, 2024
a87d260
chore(ApplicationTest): 테스트케이스(쉼표 구분자)추가
Bewheneverwhatiwant Oct 20, 2024
8068e41
chore(ApplicationTest): 테스트케이스(zhffhs rnqnswk) 추가
Bewheneverwhatiwant Oct 20, 2024
ca88274
chore(ApplicationTest): 테스트케이스(콜론 구분자) 추가
Bewheneverwhatiwant Oct 20, 2024
41788bd
Merge branch 'bewheneverwhatiwant' of https://github.com/Bewheneverwh…
Bewheneverwhatiwant Oct 20, 2024
bc4ca74
chore(ApplicationTest): 테스트케이스(커스텀 구분자만 입력하는 경우) 추가
Bewheneverwhatiwant Oct 20, 2024
865940c
chore(ApplicationTest): 테스트케이스(커스텀 구분자가 /,\,\n인 경우) 추가
Bewheneverwhatiwant Oct 20, 2024
1560c40
style: AirBnB 가이드에 맞춰 큰따옴표를 작은따옴표로 변경
Bewheneverwhatiwant Oct 20, 2024
62aec6b
style(App): AirBnB 가이드에 맞춰 큰따옴표를 작은따옴표로 변경
Bewheneverwhatiwant Oct 20, 2024
ed58de9
Merge branch 'bewheneverwhatiwant' of https://github.com/Bewheneverwh…
Bewheneverwhatiwant Oct 20, 2024
ebb788a
refactor(App): 3개의 함수들을 별도 파일로 분리
Bewheneverwhatiwant Oct 20, 2024
acf275e
refactor(all): 파일 구조를 폴더로 정리
Bewheneverwhatiwant Oct 20, 2024
6975470
refactor(add): 2개 함수를 별도 파일로 분리
Bewheneverwhatiwant Oct 20, 2024
5578dc8
docs(README): 프로그램 흐름을 정리한 내용 추가
Bewheneverwhatiwant Oct 20, 2024
a32249e
docs(README): 오타 및 개행 수정
Bewheneverwhatiwant Oct 20, 2024
fc27c21
docs(README): 디렉토리 구조 설명 추가
Bewheneverwhatiwant Oct 20, 2024
7127a59
docs(README): 개행 수정
Bewheneverwhatiwant Oct 20, 2024
8db452d
docs(README): 기능들의 상위 기능 정의
Bewheneverwhatiwant Oct 20, 2024
540ce83
docs(README): 개행 수정
Bewheneverwhatiwant Oct 20, 2024
593ae60
docs(README): 개행 수정
Bewheneverwhatiwant Oct 20, 2024
a651bc2
refactor(all): eslint.config.js 파일에 따른 eslint적용
Bewheneverwhatiwant Oct 21, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions __tests__/ApplicationTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,19 @@ describe("문자열 계산기", () => {
expect(logSpy).toHaveBeenCalledWith(expect.stringContaining(output));
});
});

test("콜론 구분자 사용", async () => {
const inputs = ["3:5:::6"];
mockQuestions(inputs);

const logSpy = getLogSpy();
const outputs = ["결과 : 14"];

const app = new App();
await app.run();

outputs.forEach((output) => {
expect(logSpy).toHaveBeenCalledWith(expect.stringContaining(output));
});
});

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

제가 이번 과제에서 미처 고려하지 못했던 부분이 바로 테스트 케이스를 작성하는 부분이었습니다
많은 분들이 제출해주신 코드를 보면서 테스트코드를 엄청 열심히 작성해주신 부분을 보고 동기부여를 받고갑니다!!

});