You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FixesDEVRhylme-Foundation#4
Add unit tests for user registration and login functionalities.
* **Tests**: Add `tests/auth.test.js` to test `POST /auth/register` and `POST /auth/login` endpoints using Jest.
* **Dependencies**: Add `jest` and `supertest` as dev dependencies in `package.json`. Add a test script to run Jest.
* **Configuration**: Add `jest.config.js` to configure Jest for the Node.js environment.
* **CI**: Modify `.github/workflows/build.yaml` to include steps for setting up Node.js, installing dependencies, and running Jest tests.
Description
Write unit tests to ensure that user registration and login functionalities work as expected.
Steps to Implement
jest
ormocha
.POST /auth/register
) to ensure that valid data is stored and invalid data is rejected.POST /auth/login
) to verify that the correct token is returned upon successful authentication.Expected Outcome
Unit tests for user registration and login ensure the system behaves correctly.
Resources
The text was updated successfully, but these errors were encountered: