본문 바로가기 메뉴 바로가기

Pewwwjjj

프로필사진
  • 글쓰기
  • 관리
  • 태그
  • 방명록
  • RSS

Pewww

검색하기 폼
  • 분류 전체보기 (27)
    • Web (2)
    • Vuex (2)
    • 자료구조 (1)
    • 페이징 (1)
    • Javascript (5)
    • WIL (What I Learned) (1)
    • Codility (8)
    • 개발 이야기 (1)
    • React, Redux... (3)
    • Typescript (1)
    • ETC Tech (1)
  • 방명록

Jest를 이용한 Reducer 테스트

이번에는 Jest를 이용한 Reducer 테스트에 대해 포스팅해보려 합니다. 다만, 테스트를 위한 세팅에 대해서는 따로 설명하지 않을 예정이니 이 점 참고 부탁드립니다. 내용이 간단하여 어려운 점은 없을 것 같습니다 :D 원칙 https://redux.js.org/recipes/writing-tests/#reducers Redux # Writing Tests redux.js.org "리듀서는 액션을 이전의 상태에 적용한 후 새로운 상태를 반환해야 한다." 함수의 유닛 테스트와 같이 state와 action만 테스트 케이스에 따라 넘겨주고, 변경된 알맞은 값을 반환하는지, 그에 맞게 상태를 잘 변경하는지에 대해 테스트 코드를 작성하면 됩니다. 예시 다만 A 부분에서 현재 액션 생성 함수에 대한 테스트도 진..

React, Redux... 2020. 3. 9. 23:53
react-waypoint를 이용한 Infinite-scrolling 구현

들어가며 피드 관련 기능을 개발할 때 Infinite-scrolling을 구현해야 할 일이 있었습니다. 구현할 때 react-waypoint를 활용했었는데, 이번 시간에는 구현 원리와 과정을 설명해볼까 합니다. react-waypoint: https://github.com/civiccc/react-waypoint civiccc/react-waypoint A React component to execute a function whenever you scroll to an element. - civiccc/react-waypoint github.com 코드 import * as React from 'react'; import {Waypoint} from 'react-waypoint'; import style..

React, Redux... 2019. 11. 10. 17:52
Codility - FrogRiverOne 풀이

Lesson4. FrogRiverOne 안녕하세요! 오늘은 Lesson4의 두 번째 문제인 FrogRiverOne에 대해 풀이해보려 합니다. Question https://app.codility.com/programmers/lessons/4-counting_elements/frog_river_one/ FrogRiverOne coding task - Learn to Code - Codility Find the earliest time when a frog can jump to the other side of a river. app.codility.com 개구리가 강 반대편으로 점프할 수 있는 가장 빠른 시간을 찾아야 합니다. 목적지를 나타내는 X와 각 요소의 범위가 1 ~ X로 이루어진 배열 A가 주어지는..

Codility 2019. 10. 22. 23:20
이전 1 2 3 4 5 6 ··· 9 다음
이전 다음
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
TAG
  • react-waypoint
  • ES2020
  • jest reducer test
  • devDependencies
  • javascript
  • redux-mock-store
  • 효율적인 디버깅
  • difference_1.default is not a function
  • esModuleInterop
  • reducer test
  • jest react test
  • tsconfig.json
  • infinite-scrolling
  • react-testing-library
  • react hoc 테스트
  • hoc test
  • NPM
  • axios
  • react-hooks test
  • vue.js
  • Package
  • ES6 Module
  • infinite-scrolling 구현
  • codility
  • js debugger
  • react-infinite-scroll
  • jest reducer 테스트
  • void 0
  • 크롬 퍼포먼스 탭
  • dependencies
more
«   2025/06   »
일 월 화 수 목 금 토
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30
글 보관함

Blog is powered by Tistory / Designed by Tistory

티스토리툴바