master에서 리팩토링 브랜치를 따서 리팩토링 하려고 한다.
일단 매번 호출하는 체스보드 그리는 함수를 별개의 파일로 분리하는 것부터 시작.
궁금한건 canvas는 테스트를 어떻게 하는건가.. 싶다.
https://www.valentinog.com/blog/canvas/
Testing an HTML canvas with Cypress
How to test an HTML canvas? Let's see an example of visual regression testing with Cypress.
www.valentinog.com
여기서는 cypress를 이용한 시각적 회귀 테스트를 하고있다.
일단 테스트는 도입하지 않았고 현재 index 파일에만 잔뜩 있는 파일을 분리하는 것부터 시작했다.
https://github.com/lelana0824/chess-game/tree/feature/before-1st-refactoring
GitHub - lelana0824/chess-game: canvas로 체스게임 만들기
canvas로 체스게임 만들기. Contribute to lelana0824/chess-game development by creating an account on GitHub.
github.com
'개발일지' 카테고리의 다른 글
[사이드프로젝트] 자동 배포 (0) | 2022.04.16 |
---|---|
[CANVAS - 체스] 8. 리팩토링 중 (0) | 2022.04.16 |
[CANVAS - 체스] 6. 사운드 입히기 (0) | 2022.04.02 |
[CANVAS - 체스] 5. 내가 클릭한 말 or 칸에 효과주기 (0) | 2022.04.02 |
[CANVAS - 체스] 4. 말 잡아먹기 (0) | 2022.04.02 |