ReactJS testing migrating from Tape to Jest

Click for: original source

Thomas Greco is the author of the post sharing his feedback about recently using Jest while contributing to the next-static project after coming across it on Next.js’ repository. He shares a ton of experience writing unit tests and explores the topic a little bit.

He provides examples how to write small unit test in Tape and then migrate it to the Jest.

Author likes that Jest makes it easy to get begin testing code. It was so easy that it lead to the confusion. He also likes snapshot tests - it will take a snapshot of a component each time a test is run. If there is an existing snapshot, Jest will compare the two to make sure that nothing in our UI has changed unexpectedly.

[Read More]

Tags tdd nodejs javascript