> For the complete documentation index, see [llms.txt](https://chris-lomeli.gitbook.io/tiny-engines/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://chris-lomeli.gitbook.io/tiny-engines/sandbox/sendgrid-mailer-intro/002-unit-test-intro.md).

# unit testing

The SendGrid mailer API is pretty basic. Let's first focus on unit testing those basic functions. One approach to testing a "unit under test" is to break out the input and outputs of the unit itself and any dependencies it has. A well-designed function (or a very simple one like this) should have clear inputs outputs and dependencies.

![](https://835605371-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MirRN1Vsv3GcZ0OdXtu%2Fsync%2F9c443d7b93bf913b90a3408ff19e5d71c724a1a0.png?generation=1630870457148956\&alt=media)

For any module we should ask:

* [x] What does our function under test do?
* [x] What are the **possible inputs** to the function, and it's dependencies?
* [x] What are the **possible outputs**?
