about-me variable
Codurance invites you to their event

Tips for improving test assertions

About this event

Testing with jest is an activity that developers do to keep the application maintainable and time proof. Therefore, learning a testing framework can be a consuming task, often it has many features to master. The assertion API usually is one of the most important ones, as this is the one that the developer uses the most during the TDD flow.

The gist of the assertion API is to compare values, as such the equals matcher is the most used. Being one of the most used can also point to a lack of knowledge in the different assertions that the testing framework offers.

This talk aims to cover different assertions, to avoid using always toEqual and make the test case more expressive. For each example, I try to first depict how it would be with toEqual, then I show another way using a different assertion.


By Matheus Marabesi

Software craftsperson at Codurance Spain 

Marabesi is addicted to software development in general, due to that, two books came out as a passion for sharing. As a hobby he likes to play with Raspberry PI and to dive into the IoT world.

Besides that he’s an aspiring researcher focused on software testing and gamification, so far he developed Testable, a gamified tool that aims to improve the unit test teaching approach, trying to change the boring perception that developers have in learning how to test their code.


Hosted by

  • Team member
    TC T
    The Codurance Team

Codurance

Software development through agile methodologies | We help organizations evolve to be more competitive, adaptable and innovative.