Our great sponsors
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
-
Playwright
Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
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:
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.
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.