End-to-end and Unit Tests

Before you run any test - end-to-end or backend - you need to configure the .env.test file.

For safety reasons, the database is not pre-configured there, but you can uncomment the suggested database settings.

The database gets erased on every test scenario! So be careful and use a disposable database.

All the pre-defined features - Authentication, Tenants, Memberships, Subscriptions, API Keys, etc - are fully tested. For the custom entities, the codebase includes template files that you can use to write your own tests. The reason is that because the custom entities can have any form, there is no way to anticipate the scenarios that need to be tested.

End-to-end Tests using Playwright

The command to run the end-to-end tests is:

npm run test:e2e

This will open the Playwright UI for you to start and watch the tests run.

Backend tests using Jest

The command to run the backend tests is:

npm run test:backend

Last updated