원문: https://jestjs.io/docs/en/asynchronous버전: Jest 23.6번역일: 2018-11-08※ 내용숙지가 완벽하지 않은 번역이라, 원문을 함께 둠Testing Asynchronous CodeIt's common in JavaScript for code to run asynchronously. When you have code that runs asynchronously, Jest needs to know when the code it is testing has completed, before it can move on to another test. Jest has several ways to handle this.Javascript에서 비동기 실행 코드는 일반적이다. 비..
원문: https://jestjs.io/docs/en/setup-teardown버전: Jest 23.6번역일: 2018-11-08※ 내용숙지 완벽하지 않은 번역이라, 원문을 함께 둠Setup and TeardownOften while writing tests you have some setup work that needs to happen before tests run, and you have some finishing work that needs to happen after tests run. Jest provides helper functions to handle this.종종 테스트를 작성할때 테스트가 실행되기전 설정 작업이 필요하면, 테스트가 실행되고 나서 설정 작업이 필요하다. Jest는 이런 ..
원문: https://jestjs.io/docs/en/using-matchers버전: Jest 23.6날짜: 2018-11-06※ 내용숙지가 안된 번역이 많아, 원문을 함께 둠Using MatchersJest uses "matchers" to let you test values in different ways. This document will introduce some commonly used matchers. For the full list, see the expect API doc.Jest는 여러가지 방법으로 값을 테스트할 수 있게 "matchers"를 사용한다. 이 문서는 일반적인 matchers를 사용법을 소개 할 것이다. 전체 목록은 expect API doc를 참조 하세요.Common Mat..
원문: 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.페이..