Skip to main content

Command Palette

Search for a command to run...

E - Expected Value

Updated
1 min read
E - Expected Value

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
 * takeOff without parameters is the scenario under test
 */
test("Airplane, takeOff without parameters, the airplane state should be FLYING after takeoff", () => {});

/** In this example the first section of the test name is in a group
 * because there will be multiple tests on the same unit.
 * takeOff without parameters is the scenario under test
 */
group("Airplane", () => {
  group("takeOff without parameters, the airplane state should be FLYING after takeoff", ()=>);

  test("takeOff with isRaining parameter set to true, , the airplane state should be FLYING after takeoff", () => {});
});

🇨🇴 Versión en Español

Unit Testing

Part 1 of 19

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.

Up next

S - Scenario

or Inputs to the Unit