gbowne1 / reactsocialnetwork

Social Media website/app made with React 18 & MUI v5
GNU General Public License v3.0
34 stars 59 forks source link

[Bug]: Login tests need to be refactored to not use act #359

Open gbowne1 opened 7 months ago

gbowne1 commented 7 months ago

Describe the Bug

Many of the tests don't pass in /Login/tests/ because they use act

Refactor the test for Login

in particular, refactor login-validation-test.js

Steps to Reproduce

running npm test inside the client

Test Suites: 2 skipped, 4 passed, 4 of 6 total
Tests:       7 skipped, 23 passed, 30 total
Snapshots:   0 total
Time:        35.991 s
Ran all test suites related to changed files.

Watch Usage
 › Press a to run all tests.
 › Press f to run only failed tests.
 › Press q to quit watch mode.
 › Press p to filter by a filename regex pattern.
 › Press t to filter by a test name regex pattern.
 › Press Enter to trigger a test run.

latest run

Screenshots

No response

Which device are you using?

Linux VM

Which operating system are you using?

Lin

Which browser are you using?

Firefox

Additional Context

No response

Contribute

gbowne1 commented 7 months ago

@sky-de @jarmentor

Please feel free to help reduce the number of issues in this project of mine and also in https://github.com/gbowne1/codebooker