원문: https://jestjs.io/docs/en/mock-functions버전: Jest 23.6날짜: 2018-11-06※ 내용숙지가 안된 번역이 많아, 원문을 함께 둠Mock FunctionsMock functions make it easy to test the links between code by erasing the actual implementation of a function, capturing calls to the function (and the parameters passed in those calls), capturing instances of constructor functions when instantiated with new, and allowing test-time con..
원문: https://jestjs.io/docs/en/tutorial-async버전: Jest 23.6날짜: 2018-11-03※ 내용숙지가 안된 번역이 많아, 원문을 함께 둠An Async ExampleFirst, enable Babel support in Jest as documented in the Getting Started guide.Let's implement a simple module that fetches user data from an API and returns the user name.우선, Getting Started 가이드에서 설명된 데로 Jest에서 Babel 적용을 활성화 하자.API로 부터 user 데이터를 패치하고 user name을 반환하는 간단한 모듈을 구현하자.// ..
원문: https://jestjs.io/docs/en/tutorial-react-native버전: Jest 23.6날짜: 2018-11-01※ 내용숙지가 안된 번역이 많아, 원문을 함께 둠 Testing React Native AppsAt Facebook, we use Jest to test React Native applications.Get a deeper insight into testing a working React Native app example by reading the following series: Part 1: Jest – Snapshot come into play and Part 2: Jest – Redux Snapshots for your Actions and Reducers.페이..