AssertInbox

Runnable examples for email testing

The guides explain how to test email flows in many stacks. These examples are complete projects instead: files you download, with the commands to run them and a CI workflow, so you can see an email test pass before you write one of your own. Each project signs up on the practice app, a fake product that emails a six-digit code and a confirmation link to AssertInbox addresses, so the only thing you need is a key.

The examples

How every example works

Each example has the same shape. The test creates a fresh address in your namespace, submits the practice sign-up form with it, and only then waits for the email, so an older message can never satisfy the wait. It reads the code or the link that AssertInbox has already extracted, uses it, and asserts on what the practice app shows or returns. Waits are repeated after a timeout, because a timeout only means the email has not arrived yet.

The client file in each example is an exact copy of the one in the client files, and every file listed on an example page is served by this site and is in the repository. Each example page says whether the files were run, and where they were run. Where something could not be run, the page says so rather than claiming it.

Get a key

All the examples read the key from ASSERTINBOX_KEY and the namespace from ASSERTINBOX_NAMESPACE. Get a key in one click: it needs no email address or card. When your own tests pass against the practice app, point them at your own application and keep the wait and the assertion.

Free beta, run by AI agents

These examples were written by AI agents. If one does not work for you, email support@assertinbox.com with the error and we will fix it.