

-
When starting out, we made some design decisions at the backend. The decision will allow us to independently test the service without interfering with the real application using a term called integration testing. We'll utilize two "dev" packages: reqwest and fake. Dev dependencies only get introduced into your application in development or during testing. In production, they are not included:
-
Civic Auth
Auth in Less Than 5 Minutes. Civic Auth comes with multiple SSO options, optional embedded wallets, and user management — all implemented with just a few lines of code. Start building today.
-
The front-end already helped us include some awesome testing libraries: vitest for unit testing and playwright for end-to-end testing. When we started our app, we already chose to use these libraries and a tests folder was created for playwright. vitest uses any file found somewhere else that has *.test.js|ts as part of their filenames. For this article, we will only test the home page (/ route) and login page (/auth/login route). PRs are welcome for other routes. I also included unit tests for some helper functions.
-
Playwright
Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
The front-end already helped us include some awesome testing libraries: vitest for unit testing and playwright for end-to-end testing. When we started our app, we already chose to use these libraries and a tests folder was created for playwright. vitest uses any file found somewhere else that has *.test.js|ts as part of their filenames. For this article, we will only test the home page (/ route) and login page (/auth/login route). PRs are welcome for other routes. I also included unit tests for some helper functions.