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

적절한 유닛 테스트 환경 찾기 #254

Closed
bichikim opened this issue Nov 18, 2022 · 0 comments · Fixed by #361
Closed

적절한 유닛 테스트 환경 찾기 #254

bichikim opened this issue Nov 18, 2022 · 0 comments · Fixed by #361
Assignees
Labels
All Porjects related all projects
Projects

Comments

@bichikim
Copy link
Owner

bichikim commented Nov 18, 2022

jsdom 은 실제 브라우저 구현을 치명적인 수준으로 못하기 때문에 (media query 등) jest + jsdom 은 그만 사용하기로 결정

대안 실제 브라우저에서 코드가 동작하는 것을 이용한다 아래와 같은 종류가 있다

  1. karma + vite karma-vit
  2. mocha + vite + puppetter mocha-vite-puppeteer
  3. vitest web-runner 를 기다린다 feat: init @vitest/browser package
  4. storybook + playwright 를 사용 test-runner
  5. jest + puppeteer 를 사용 하여 컴포넌트 테스트를 적절히 할 수 있는 코드 추가

판단

  1. karma + vite 은 당장 사용 가능한 수준이나 module mocking 등은 직접 구현해야 할지도 모른다
  2. 유지보수가 중지 되어 보인다
  3. 1을 쓰다가 vitest web-runner 로 갈아 타는 것이 좋아 보인다
  4. 아직 module mocking 가능 여부 검토 중

모듈 모킹
https://modern-web.dev/docs/test-runner/writing-tests/mocking/#mocking-es-modules

@bichikim bichikim self-assigned this Nov 18, 2022
@bichikim bichikim added this to To do in MVP 1 via automation Nov 18, 2022
@bichikim bichikim moved this from To do to Done in MVP 1 Nov 18, 2022
@bichikim bichikim reopened this Nov 18, 2022
@bichikim bichikim moved this from Done to In progress in MVP 1 Nov 18, 2022
@bichikim bichikim mentioned this issue Jan 26, 2024
Merged
@bichikim bichikim added the All Porjects related all projects label Jan 26, 2024
MVP 1 automation moved this from In progress to Done Jan 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
All Porjects related all projects
Projects
No open projects
MVP 1
Done
Development

Successfully merging a pull request may close this issue.

1 participant