Showing posts with label jest. Show all posts
Showing posts with label jest. Show all posts

Saturday, February 16, 2019

Getting Started

Getting Started

Let's get started by writing a test for a hypothetical function that adds two numbers. First, create a sum.js file: Then, create a file named sum.test.js. This will contain our actual test:

Sunday, December 31, 2017

Redux Testing Step by Step: A Simple Methodology for Testing Business Logic



Part two of our Redux workflow series. A well-implemented system is only half the work. The other half is an automated suite of tests proving our system is behaving according to spec. This is a crucial factor in increasing our engineering velocity.

Unit testing with Jest: Redux + async actions + fetch



LAST UPDATE: June 24, 2017. Original writing: May 19, 2016. I have been using Jest since its beginnings. I won’t lie, the path has been painful: Things like updating from version 0.x.0 to version 0.y.0 (specially to version 0.4.0) was particularly terrible for my tests.

Real integration tests with React, Redux and Router



After being bitten a couple of times by bad refactoring and a broken app — even with all my tests green — I started to research about integration tests in React. Possibly also with Redux and React Router. To my absolute shock, I couldn’t find any good material out there.

Friday, July 14, 2017

Testing a React-Redux app using Jest and Enzyme



As we enter into the new year(2017), I wanted to pause from writing posts on stuffs that excite me like developing something new like some React app or learning and trying out some super awesome library like GraphQL etc and just go few steps back and focus on unit testing and TDD.

Thursday, June 22, 2017

Real integration tests with React, Redux and Router



After being bitten a couple of times by bad refactoring and a broken app — even with all my tests green — I started to research about integration tests in React. Possibly also with Redux and React Router. To my absolute shock, I couldn’t find any good material out there.

bundlephobia

JavaScript bloat is a more real problem today than it ever was. Bundlephobia lets you understand the performance cost of adding a npm pack...