After the usual use strict; use warnings; we load the Test::More module.

The we declare our "plan" telling the system we are going to have 3 unit-tests, or 3 assertions.

I usually cal them "test units" becasue they are not necessarily "unit tests". Thy might test the interaction of
several subsystem. Stillthey would have some input and then we can check if the output matches th expected values.

In this script we have 3 cases.

The first one use_ok('App'); is checking if the module can be loaded with a use statement.
Actually I think the use of use_ok is now discouraged. We should just load the module with regular use App;.
If something is wrong it will throw an exception anyway.

Then we call the add function of the App module and check if the result is indeed 2.

A better way to comparing real and expected values is by using the is function provided by Test::More.
That, in addition to checking if the real value is the same as the exected value, will also provide a detailed
report in case the result does not match.