AAA - Test Structure

Search for a command to run...

No comments yet. Be the first to comment.
Unit tests are a tireless guard that overwatch your software to ensure it always behaves as it's expected. In this series I'll introduce to you its basic concepts.
In this section we are in charge of initializing all the dependencies (real or test doubles) required to simulate the situation we are going to verify in the unit test. test("the airplane state should be FLYING after takeoff", () => { /** * Noti...
The Numbered Shelf

It's the third section in the name. It specifies what's the expected result after executing the unit of code under the simulated scenario. /** In this example the three sections of the name are in the same text. * Airplane is the Unit under test * ...

or Inputs to the Unit

It's the first section in the name. It specifies which is the unit that we're currently testing. The unit can be in the same text as the other sections or separated in a group if we're going to create multiple unit tests for the same unit of code. /*...

It's the structure we use to name a unit test in a way that it’s identified and its context understood.Each letter represents a section: Unit under test: Which unit are we testing? Scenario or inputs to the unit: What situation are we simulating? Ex...

Fifty Words
21 posts